123456789101112131415161718192021222324252627282930313233343536 |
- using Prime31;
- using UnityEngine;
- using System.Collections;
- public class PostFBMessage : MonoBehaviour
- {
- public static PostFBMessage Instance;
- void completionHandler(string error, object result)
- {
- if (error != null)
- {
- Debug.LogError(error);
- MenuManager._instance.FBShareDialog.Hide();
- MenuManager._instance.OnActionAfterWin();
- }
- else
- {
- //Prime31.Utils.logObject(result);
- MenuManager._instance.FBShareDialog.Hide();
- MenuManager._instance.OnActionAfterWin();
- }
-
- }
- void Start()
- {
- Instance = this;
- }
- public void PostMessageFB()
- {
- WrapperFB.PostFB();
- //Facebook.instance.postMessageWithLinkAndLinkToImage(Localization.instance.Get("facebook.shareChallengeWon.description"), GameConstants.PLAY_GAME_URL, Localization.instance.Get("facebook.shareChallengeWon.linkName"), GameConstants.FACEBOOK_POST_IMAGE, Localization.instance.Get("facebook.shareChallengeWon.imageCaption"), completionHandler);
- PlayerPrefs.SetInt("Post", 1);
- }
- }
|