UIPostInviteFriends.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using Prime31;
  2. using UnityEngine;
  3. using System.Collections;
  4. public class UIPostInviteFriends : MonoBehaviour {
  5. void completionHandler(string error, object result)
  6. {
  7. if (error != null)
  8. {
  9. Debug.LogError(error);
  10. //MenuManager._instance.FBShareDialog.Hide();
  11. //MenuManager._instance.OnActionAfterWin();
  12. }
  13. else
  14. {
  15. Prime31.Utils.logObject(result);
  16. //MenuManager._instance.FBShareDialog.Hide();
  17. //MenuManager._instance.OnActionAfterWin();
  18. }
  19. }
  20. void Start()
  21. {
  22. //FacebookManager.shareDialogFailedEvent += shareDialogFailedEvent;
  23. //FacebookManager.shareDialogSucceededEvent += shareDialogSucceededEvent;
  24. }
  25. public void PostInviteFB()
  26. {
  27. //LifeManager.Instance.InvitePlayer();
  28. //SocialWrapper.Invite();
  29. }
  30. void OnDisable()
  31. {
  32. //FacebookManager.shareDialogFailedEvent -= shareDialogFailedEvent;
  33. //FacebookManager.shareDialogSucceededEvent -= shareDialogSucceededEvent;
  34. }
  35. void shareDialogSucceededEvent(string postId)
  36. {
  37. AdManager.Instance.PlayVideoAd();
  38. Debug.Log("shareDialogSucceededEvent: " + postId);
  39. }
  40. void shareDialogFailedEvent(P31Error error)
  41. {
  42. AdManager.Instance.PlayVideoAd();
  43. Debug.Log("shareDialogFailedEvent: " + error);
  44. }
  45. }