コード例 #1
0
ファイル: LoginPage.cs プロジェクト: jovelbarrera/Starving
 private async void _facebookButton_Clicked(object sender, EventArgs e)
 {
     DisableControls();
     try {
         IFacebookButton facebook = DependencyService.Get <IFacebookButton> ();
         facebook.LoginWithReadPermissions(new string[] { "email" }, async(d) => {
             if (d == null)
             {
                 EnableControls();
                 DisplayAlert(AppConfig.ApplicationName, "Facebook acount was not linked", "OK");
                 return;
             }
             await _parseService.LoginWithFacebook(d.UserId, d.AccessToken, d.TokenExpiration, s => FacebookLoginCallback(s));
         });
     } catch (Exception ex) {
         string er = ex.Message;
     }
 }