Exemplo n.º 1
0
        public async Task <bool> GetAccountInfo(FacebookAuthenticationEventArgs authenticationEventArgs)
        {
            Uri url = new Uri(BaseAccessUrl + "/me?access_token=" + authenticationEventArgs.AccessToken);

            string result = await CallApi(url);


            //try
            //{
            //    JObject jobj = JObject.Parse(result);


            //    user.Username = jobj["name"].ToString();
            //    user.Email = jobj["email"].ToString();
            //}
            //catch (Exception ex)
            //{
            //    DiagnosticsHelper.Instance.WriteLine("FacebookConnection GetAccountInfo error:" + ex.Message);
            //}


            this.GetAccountInfoCompleted(this, new FacebookIdentificationEventArgs(authenticationEventArgs, result));
            return(true);
        }
		public FacebookIdentificationEventArgs(FacebookAuthenticationEventArgs authorization, string results)
		{
			this.AuthenticationEventArgs = authorization;
			this.Result = results;
		}
		public async Task<bool> GetAccountInfo(FacebookAuthenticationEventArgs authenticationEventArgs)
		{
			Uri url = new Uri(BaseAccessUrl + "/me?access_token=" + authenticationEventArgs.AccessToken);

			string result = await CallApi(url);


            //try
            //{
            //    JObject jobj = JObject.Parse(result);


            //    user.Username = jobj["name"].ToString();
            //    user.Email = jobj["email"].ToString();
            //}
            //catch (Exception ex)
            //{
            //    DiagnosticsHelper.Instance.WriteLine("FacebookConnection GetAccountInfo error:" + ex.Message);
            //}


			this.GetAccountInfoCompleted(this, new FacebookIdentificationEventArgs(authenticationEventArgs, result));
			return true;
		}
Exemplo n.º 4
0
 public FacebookIdentificationEventArgs(FacebookAuthenticationEventArgs authorization, string results)
 {
     this.AuthenticationEventArgs = authorization;
     this.Result = results;
 }