/// <summary> /// Opens this <c>Gate</c> if the social action that was finished causes the /// <c>Gate</c>'s criteria to be met. /// </summary> /// <param name="provider">Social provider related to the action that was finished.</param> /// <param name="socialActionType">The type of the social action that was finished.</param> /// <param name="payload">Payload to compare with this <c>Gate</c>'s ID.</param> protected void onSocialActionFinished(Provider provider, SocialActionType socialActionType, string payload) { if (payload == this.ID) { ForceOpen(true); } }
private void onSocialActionFailed(Provider provider, SocialActionType action, string message, string payload) { if (provider == Provider.TWITTER) { if (action == SocialActionType.UPDATE_STORY) { if (SceneManager.GetActiveScene().name == "menu") { MenuController.instance.NotificationMessage("Connection Failed"); } } } }
void onSocialActionFailed(Provider provider, SocialActionType action, string message, string payload) { if (provider == Provider.TWITTER) { if (action == SocialActionType.UPDATE_STORY) { if (Application.loadedLevelName == "MainMenu") { MenuController.instance.NotificationMessage("Could Not Post"); } } } }
void onSocialActionFinished(Provider provider, SocialActionType action, string payload) { if (provider == Provider.TWITTER) { if (action == SocialActionType.UPDATE_STORY) { if (Application.loadedLevelName == "MainMenu") { MenuController.instance.NotificationMessage("Thank You For Sharing"); } } } }
public void onSocialActionCancelled(Provider provider, SocialActionType action, string payload) { if (provider == Provider.TWITTER) { if (action == SocialActionType.UPDATE_STORY) { if (SceneManager.GetActiveScene().name == "MainMenu") { MenuController.instance.NotificationMessage("Could not post"); } } } }
public void OnAppInviteComplete(string message) { SocialActionType actionType = SocialActionType.INVITE; JSONObject eventInfo = new JSONObject(message); if (didComplete(eventInfo)) { StansAssetsGrowIntegration.Instance.OnSocialActionFinished(PROVIDER, actionType); } else if (isCancelled(eventInfo)) { StansAssetsGrowIntegration.Instance.OnSocialActionCancelled(PROVIDER, actionType); } else // if eventInfo ["error"] { StansAssetsGrowIntegration.Instance.OnSocialActionFailed(PROVIDER, actionType); } DelegateMessage(message); }
public void OnShareLinkComplete(string message) { SocialActionType actionType = SocialActionType.UPDATE_STORY; JSONObject eventInfo = new JSONObject(message); if (eventInfo ["postId"] || eventInfo ["id"]) { StansAssetsGrowIntegration.Instance.OnSocialActionFinished(PROVIDER, actionType); } else if (isCancelled(eventInfo) || didComplete(eventInfo) || eventInfo ["posted"]) { StansAssetsGrowIntegration.Instance.OnSocialActionCancelled(PROVIDER, actionType); } else // if eventInfo ["error"] { StansAssetsGrowIntegration.Instance.OnSocialActionFailed(PROVIDER, actionType); } DelegateMessage(message); }
// Give reward avatars when successfully posting to facebook or twitter public void onSocialActionFinished(Provider provider, SocialActionType action, string payload) { // provider is the social provider // action is the social action (like, post status, etc..) that finished // payload is an identification string that you can give when you initiate the social action operation and want to receive back upon its completion string social_provider = payload; Debug.Log(provider); if (social_provider == "facebook") { RewardedAvatars.incrementAvatarBalance(RewardedAvatars.ghost_avatar_rwd); RewardedAvatars.incrementAvatarBalance(RewardedAvatars.ghost_tail_rwd); } else if (social_provider == "twitter") { RewardedAvatars.incrementAvatarBalance(RewardedAvatars.star_avatar_rwd); RewardedAvatars.incrementAvatarBalance(RewardedAvatars.star_tail_rwd); } }
public void SocialActionCanceled(Provider provider, SocialActionType action, string payload) { }
public void SocialActionFailed(Provider provider, SocialActionType action, string message, string payload) { }
public void SocialActionFinished(Provider provider, SocialActionType action, string payload) { }
private void OnSocialActionFailed(Provider provider, SocialActionType type, string error, string payload) { Debug.Log("Social action failed with error message: " + error); }
private void OnSocialActionCancelled(Provider provider, SocialActionType type, string payload) { Debug.Log("Social action cancelled"); }
private void OnSocialActionFinished(Provider provider, SocialActionType type, string payload) { Debug.Log("Social action finished. Provider: " + provider.ToString() + " Action: " + type.ToString()); }