示例#1
0
 public void GetUserProfile(UserProfileCallback callback)
 {
     cloudHandler.GetUserProfile((UserProfileReply reply) =>
     {
         StartCoroutine(socialHandler.GetPictureFromIdCoroutine((Texture2D tex) =>
         {
             reply.picture = tex;
             callback(reply);
         }));
     });
 }
示例#2
0
 public static void GetUserProfile(string UserId, UserProfileCallback callback)
 {
     Debug.Log("GetUserProfile Called");
     if (UserData.IsCreateUserData())
     {
         FB.API("/" + UserId, HttpMethod.GET, GraphResult =>
         {
             Debug.Log(GraphResult.RawResult);
             Dictionary <string, string> userProfiles = new Dictionary <string, string>();
             userProfiles.Add("name", GraphResult.ResultDictionary["name"] as string);
             userProfiles.Add("gender", GraphResult.ResultDictionary["gender"] as string);
             userProfiles.Add("birthday", GraphResult.ResultDictionary["birthday"] as string);
             callback(userProfiles);
         }, new Dictionary <string, string> {
             { "access_token", UserData.userData.userAccessToken }, { "fields", "name,gender,birthday" }
         });
     }
 }
示例#3
0
        public void GetUserProfile(string uid, UserProfileCallback callback = null)
        {
            LogEventRequest_GetUserProfile req = new LogEventRequest_GetUserProfile();

            req.Set_id(uid);
            req.Send((response) =>
            {
                if (callback != null)
                {
                    if (response.HasErrors)
                    {
                        callback(new UserProfileReply(false, "GS failed to fetch user profile, " + response.Errors.ToString()));
                    }
                    else
                    {
                        callback(CloudConverter.UserProfileResponseToUserProfileReply(response));
                    }
                }
            });
        }
示例#4
0
 public void GetUserProfile(string uid, UserProfileCallback callback)
 {
     cloudHandler.GetUserProfile(uid, callback);
 }