private void mProfileTracker_mOnProfileChanged(object sender, OnProfileChangedEventArgs e) { Pessoa alguem = new Pessoa(); if (e.mProfile != null) { try { alguem.primeiroNome = e.mProfile.FirstName; alguem.sobrenome = e.mProfile.LastName; alguem.nome = e.mProfile.Name; } catch (Exception ex) { //Handle error } } AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.SetTitle("Mensagem"); builder.SetMessage("" + alguem.primeiroNome + ", " + alguem.sobrenome + ", " + alguem.nome); builder.SetCancelable(false); builder.SetPositiveButton("OK", (senderAlert, args) => { }); builder.Show(); }
private void MprofileTrackerOnM_OnProfileChanged(object sender, OnProfileChangedEventArgs e) { try { if (e.mProfile != null) { try { FB_firstName = e.mProfile.FirstName; FB_lastName = e.mProfile.LastName; FB_name = e.mProfile.Name; FB_profileId = e.mProfile.Id; var request = GraphRequest.NewMeRequest(AccessToken.CurrentAccessToken, this); var parameters = new Bundle(); parameters.PutString("fields", "id,name,age_range,email"); request.Parameters = parameters; request.ExecuteAsync(); } catch (Java.Lang.Exception ex) { Console.WriteLine(ex); } } else { Toast.MakeText(this, GetString(Resource.String.Lbl_Null_Data_User), ToastLength.Short).Show(); } } catch (Exception exception) { Console.WriteLine(exception); } }
void mProfileTracker_mOnProfileChanged(object sender, OnProfileChangedEventArgs e) { if (e.mProfile != null) { try { //mTxtFirstName.Text = e.mProfile.FirstName; //mTxtLastName.Text = e.mProfile.LastName; //mTxtName.Text = e.mProfile.Name; //mTxtEmail.Text = e.mProfile.Email; mProfilePic.ProfileId = e.mProfile.Id; System.Diagnostics.Debug.Write("welllllllllllllllll" + e.mProfile.Class); System.Diagnostics.Debug.Write("welllllllllllllllll" + e.mProfile.Handle); System.Diagnostics.Debug.Write("welllllllllllllllll"); } catch (Exception ex) { //Handle error } } else { //the user must have logged out //mTxtFirstName.Text = "First Name"; //mTxtLastName.Text = "Last Name"; //mTxtName.Text = "Name"; mProfilePic.ProfileId = null; } }
void mProfileTracker_mOnProfileChanged(object sender, OnProfileChangedEventArgs e) { if (e.mProfile != null) { try { string name = e.mProfile.Name; string profileId = e.mProfile.Id; } catch (Java.Lang.Exception exc) { } } else { } }
private async void profileChanged(object sender, OnProfileChangedEventArgs e) { if (e.mProfile != null) { try { Profile profile = e.mProfile; //await Task.Delay(5000); if (!jaEntrou) { await Conectar(profile); } } catch (System.Exception ex) { DroidUtils.MostraMensagem("profileChanged", ex.Message); } } }
void mProfileTracker_mOnProfileChanged(object sender, OnProfileChangedEventArgs e) { LoginManager.Instance.LogInWithReadPermissions(this, new List <string> { "user_friends", "public_profile" }); if (e.mProfile != null) { try { var sc = new SocialLoginData(); sc.scFirstName = e.mProfile.FirstName; sc.scLastName = e.mProfile.LastName; sc.scUserName = e.mProfile.FirstName + e.mProfile.LastName; sc.scSocialId = e.mProfile.Id; facebookpicture = "http://graph.facebook.com/" + e.mProfile.Id + "/picture?type=large"; sc.scProfileImgUrl = facebookpicture; sc.scEmail = email ?? ""; sc.scSource = "facebook"; sc.scAccessUrl = "http://facebook.com/profile.php?id=" + e.mProfile.Id; sc.scSocialOauthToken = AccessToken.CurrentAccessToken.Token; sc.scAccount = AccessToken.CurrentAccessToken.UserId; GraphRequest request = GraphRequest.NewMeRequest(AccessToken.CurrentAccessToken, this); Bundle parameters = new Bundle(); parameters.PutString("fields", "id,name,email,picture"); request.Parameters = parameters; request.ExecuteAsync(); StartRegistration(sc); } catch (Java.Lang.Exception ex) { } } }
void mProfileTracker_mOnProfileChanged(object sender, OnProfileChangedEventArgs e) { if (e.mProfile != null) { try { TxtFirstName.Text = e.mProfile.FirstName; TxtLastName.Text = e.mProfile.LastName; TxtName.Text = e.mProfile.Name; mprofile.ProfileId = e.mProfile.Id; } catch (Java.Lang.Exception ex) { } } else { TxtFirstName.Text = "First Name"; TxtLastName.Text = "Last Name"; TxtName.Text = "Name"; mprofile.ProfileId = null; } }
//Login With Facebook private void ProfileTrackerOnMOnProfileChanged(object sender, OnProfileChangedEventArgs e) { try { if (e.MProfile != null) { //var FbFirstName = e.MProfile.FirstName; //var FbLastName = e.MProfile.LastName; //var FbName = e.MProfile.Name; //var FbProfileId = e.MProfile.Id; var request = GraphRequest.NewMeRequest(AccessToken.CurrentAccessToken, this); var parameters = new Bundle(); parameters.PutString("fields", "id,name,age_range,email"); request.Parameters = parameters; request.ExecuteAsync(); } } catch (Exception ex) { Console.WriteLine(ex); } }
private void OFacebookService_mOnProfileChanged(object sender, OnProfileChangedEventArgs e) { if (e.mProfile != null) { try { txtFirstName.Text = e.mProfile.FirstName; txtLastName.Text = e.mProfile.LastName; txtName.Text = e.mProfile.Name; pictureView.ProfileId = e.mProfile.Id; } catch (Java.Lang.Exception ex) { } } else { txtFirstName.Text = "First Name"; txtLastName.Text = "Last Name"; txtName.Text = "Name"; pictureView.ProfileId = null; } }
private void OFacebookService_mOnProfileChanged(object sender, OnProfileChangedEventArgs e) { var fb = Owner.GetInstance(); if (e.mProfile != null) { try { fb.firstName = e.mProfile.FirstName; fb.lastName = e.mProfile.LastName; fb.facebookId = e.mProfile.Id; StartActivity(typeof(RegisterActivity)); } catch (Java.Lang.Exception ex) { } } else { fb.firstName = string.Empty; fb.lastName = string.Empty; fb.id = string.Empty; } }
void mProfileTracker_mOnProfileChanged(object sender, OnProfileChangedEventArgs e) { mTxtFirstName.Text = e.mProfile.FirstName; }