public void LinkCallback(string platformUserInfo) { var jobject = JObject.Parse(platformUserInfo); var isGuest = (bool)jobject["isGuest"]; if (isGuest) { if (OnGuestModeActivated != null) { OnGuestModeActivated(); } return; } try { CloudGoods.LoginWithPlatformUser((CloudGoodsPlatform)Enum.Parse(typeof(CloudGoodsPlatform), jobject["platformID"].ToString()), jobject["userID"].ToString(), jobject["userName"].ToString()); } catch (Exception) { throw new Exception("Platform web script has passed in incorrect data"); } /*Systems.UserGetter.GetSocialPlayUser(userinfo, (user) => * { * if (OnRecievedUser != null) * OnRecievedUser(user); * });*/ }
public void OnKongregateAPILoaded(string userInfoString) { if (BuildPlatform.Platform == BuildPlatform.BuildPlatformType.Automatic) { BuildPlatform.Platform = BuildPlatform.BuildPlatformType.Kongergate; } string[] parts = userInfoString.Split('|'); CloudGoods.LoginWithPlatformUser(CloudGoodsPlatform.Kongregate, parts[0], parts[1]); }
void Start() { Debug.Log("In Editor, Logging in as Test User with access token: " + CloudGoods.AppID); CloudGoods.LoginWithPlatformUser(CloudGoodsPlatform.SocialPlay, "2", "Editor Test User"); }