Esempio n. 1
0
 private void LoginCallBack(FBResult result)
 {
     if (!string.IsNullOrEmpty(result.Error))
     {
         Debug.Log(string.Format("Login Error Response: {0}", result.Error));
         if (actionLoginCallback != null)
         {
             actionLoginCallback(false);
         }
     }
     else if (!FB.IsLoggedIn)
     {
         Debug.Log(string.Format("Login was cancelled by user: {0}", result.Text));
         if (actionLoginCallback != null)
         {
             actionLoginCallback(false);
         }
     }
     else
     {
         Debug.Log(string.Format("Login was successful: {0}", result.Text));
         if (actionLoginCallback != null)
         {
             actionLoginCallback(true);
         }
     }
     result.Dispose();
 }
Esempio n. 2
0
 private void FeedAPICallback(FBResult result)
 {
     if (!string.IsNullOrEmpty(result.Error))
     {
         Debug.Log("Failed to feed: " + result.Error);
         if (actionFeedAPICallback != null)
         {
             actionFeedAPICallback(false);
         }
     }
     else
     {
         Debug.Log("Feed success");
         if (actionFeedAPICallback != null)
         {
             actionFeedAPICallback(true);
         }
     }
     result.Dispose();
 }
Esempio n. 3
0
 public void GetPictureProfileCallback(FBResult result)
 {
     if (!string.IsNullOrEmpty(result.Error))
     {
         Debug.Log(string.Format("Failed to get picture profile: {0}", result.Error));
         if (actionGetBasicUserProfileCallback != null)
         {
             actionGetBasicUserProfileCallback(false);
         }
     }
     else
     {
         Dictionary <string, object> resultAPIData = Json.Deserialize(result.Text) as Dictionary <string, object>;
         resultAPIData = resultAPIData["data"] as Dictionary <string, object>;
         string pictureURL = resultAPIData["url"] as string;
         StartCoroutine(GetPictureProfileFromURL(pictureURL, actionGetPictureProfileCallback));
         Debug.Log(string.Format("url: {0}", pictureURL));
     }
     result.Dispose();
 }
Esempio n. 4
0
 public void GetBasicUserProfileCallback(FBResult result)
 {
     if (!string.IsNullOrEmpty(result.Error))
     {
         Debug.Log(string.Format("Failed to get basic user profile: {0}", result.Error));
         if (actionGetBasicUserProfileCallback != null)
         {
             actionGetBasicUserProfileCallback(false);
         }
     }
     else
     {
         Dictionary <string, object> resultAPIData = Json.Deserialize(result.Text) as Dictionary <string, object>;
         userProfileID   = resultAPIData["id"] as string;
         userProfileName = resultAPIData["name"] as string;
         Debug.Log(string.Format("id: {0}|name: {1}", userProfileID, userProfileName));
         if (actionGetBasicUserProfileCallback != null)
         {
             actionGetBasicUserProfileCallback(true);
         }
     }
     result.Dispose();
 }
Esempio n. 5
0
 public void GetBasicUserProfileCallback(FBResult result)
 {
     if (!string.IsNullOrEmpty(result.Error))
     {
         Debug.Log(string.Format("Failed to get basic user profile: {0}", result.Error));
         if (actionGetBasicUserProfileCallback != null) actionGetBasicUserProfileCallback(false);
     }
     else
     {
         Dictionary<string, object> resultAPIData = Json.Deserialize(result.Text) as Dictionary<string, object>;
         userProfileID = resultAPIData["id"] as string;
         userProfileName = resultAPIData["name"] as string;
         Debug.Log(string.Format("id: {0}|name: {1}", userProfileID, userProfileName));
         if (actionGetBasicUserProfileCallback != null) actionGetBasicUserProfileCallback(true);
     }
     result.Dispose();
 }
Esempio n. 6
0
 private void OpenFeedCallback(FBResult result)
 {
     if (!string.IsNullOrEmpty(result.Error))
     {
         Debug.Log("Failed to feed: " + result.Error);
         if (actionFeedDialogCallback != null) actionFeedDialogCallback(false);
     }
     else
     {
         Debug.Log("Feed success");
         if (actionFeedDialogCallback != null) actionFeedDialogCallback(true);
     }
     result.Dispose();
 }
Esempio n. 7
0
 private void LoginCallBack(FBResult result)
 {
     if (!string.IsNullOrEmpty(result.Error))
     {
         Debug.Log(string.Format("Login Error Response: {0}", result.Error));
         if (actionLoginCallback != null) actionLoginCallback(false);
     }
     else if (!FB.IsLoggedIn)
     {
         Debug.Log(string.Format("Login was cancelled by user: {0}", result.Text));
         if (actionLoginCallback != null) actionLoginCallback(false);
     }
     else
     {
         Debug.Log(string.Format("Login was successful: {0}", result.Text));
         if (actionLoginCallback != null) actionLoginCallback(true);
     }
     result.Dispose();
 }
Esempio n. 8
0
 public void GetPictureProfileCallback(FBResult result)
 {
     if (!string.IsNullOrEmpty(result.Error))
     {
         Debug.Log(string.Format("Failed to get picture profile: {0}", result.Error));
         if (actionGetBasicUserProfileCallback != null) actionGetBasicUserProfileCallback(false);
     }
     else
     {
         Dictionary<string, object> resultAPIData = Json.Deserialize(result.Text) as Dictionary<string, object>;
         resultAPIData = resultAPIData["data"] as Dictionary<string, object>;
         string pictureURL = resultAPIData["url"] as string;
         StartCoroutine(GetPictureProfileFromURL(pictureURL, actionGetPictureProfileCallback));
         Debug.Log(string.Format("url: {0}", pictureURL));
     }
     result.Dispose();
 }