Пример #1
0
        public void GetUserProfile(GetUserProfileSuccess success, GetUserProfileFailed fail)
        {
            this.fetchPermissions(() => {
                FB.API("/me?fields=id,name,email,first_name,last_name,picture,languages,gender,location,birthday",
                       HttpMethod.GET, (IGraphResult meResult) => {
                    if (meResult.Error != null)
                    {
                        SoomlaUtils.LogDebug(TAG, "ProfileCallback[result.Error]: " + meResult.Error);
                        fail(meResult.Error);
                    }
                    else
                    {
                        SoomlaUtils.LogDebug(TAG, "ProfileCallback[result.Text]: " + meResult.RawResult);
                        SoomlaUtils.LogDebug(TAG, "ProfileCallback[result.Texture]: " + meResult.Texture);
                        string fbUserJson       = meResult.RawResult;
                        UserProfile userProfile = UserProfileFromFBJsonString(fbUserJson, this);

                        SoomlaProfile.StoreUserProfile(userProfile, true);
                        success(userProfile);
                    }
                });
            },
                                  (string errorMessage) => {
                fail(errorMessage);
            });
        }
Пример #2
0
        public override void GetUserProfile(GetUserProfileSuccess success, GetUserProfileFailed fail)
        {
            this.fetchPermissions(() => {
                FB.API("/me?fields=id,name,email,first_name,last_name,picture",
                       Facebook.HttpMethod.GET, (FBResult meResult) => {
                    if (meResult.Error != null)
                    {
                        SoomlaUtils.LogDebug(TAG, "ProfileCallback[result.Error]: " + meResult.Error);
                        fail(meResult.Error);
                    }
                    else
                    {
                        SoomlaUtils.LogDebug(TAG, "ProfileCallback[result.Text]: " + meResult.Text);
                        SoomlaUtils.LogDebug(TAG, "ProfileCallback[result.Texture]: " + meResult.Texture);
                        string fbUserJson       = meResult.Text;
                        UserProfile userProfile = UserProfileFromFBJsonString(fbUserJson);

                        SoomlaProfile.StoreUserProfile(userProfile, true);

                        success(userProfile);
                    }
                });
            },
                                  (string errorMessage) => {
                fail(errorMessage);
            });
        }
		public override void GetUserProfile(GetUserProfileSuccess success, GetUserProfileFailed fail) {
			this.fetchPermissions(() => {
				FB.API("/me?fields=id,name,email,first_name,last_name,picture,languages,gender,location",
				       HttpMethod.GET, (IGraphResult meResult) => {
					if (meResult.Error != null) {
						SoomlaUtils.LogDebug (TAG, "ProfileCallback[result.Error]: " + meResult.Error);
						fail(meResult.Error);
					}
					else {
						SoomlaUtils.LogDebug(TAG, "ProfileCallback[result.Text]: "+meResult.RawResult);
						SoomlaUtils.LogDebug(TAG, "ProfileCallback[result.Texture]: "+meResult.Texture);
						string fbUserJson = meResult.RawResult;
						UserProfile userProfile = UserProfileFromFBJsonString(fbUserJson, this);

						SoomlaProfile.StoreUserProfile (userProfile, true);
						success(userProfile);
					}
				});
			},
			(string errorMessage) => {
				fail(errorMessage);
			});
		}
Пример #4
0
 /// <summary>
 /// See docs in <see cref="SoomlaProfile.GetUserProfile"/>
 /// </summary>
 public override void GetUserProfile(GetUserProfileSuccess success, GetUserProfileFailed fail)
 {
 }
Пример #5
0
 /// <summary>
 /// See docs in <see cref="SoomlaProfile.GetUserProfile"/>
 /// </summary>
 public abstract void GetUserProfile(GetUserProfileSuccess success, GetUserProfileFailed fail);
 /// <summary>
 /// See docs in <see cref="SoomlaProfile.GetUserProfile"/>
 /// </summary>
 public override void GetUserProfile(GetUserProfileSuccess success, GetUserProfileFailed fail)
 {
 }
 /// <summary>
 /// See docs in <see cref="SoomlaProfile.GetUserProfile"/>
 /// </summary>
 public void GetUserProfile(GetUserProfileSuccess success, GetUserProfileFailed fail)
 {
 }
Пример #8
0
 /// <summary>
 /// See docs in <see cref="SoomlaProfile.GetUserProfile"/>
 /// </summary>
 public abstract void GetUserProfile(GetUserProfileSuccess success, GetUserProfileFailed fail);
		/// <summary>
		/// See docs in <see cref="SoomlaProfile.GetUserProfile"/>
		/// </summary>
		public void GetUserProfile(GetUserProfileSuccess success, GetUserProfileFailed fail) {
		}