コード例 #1
0
        public Task <FbLoginResult> SignOut()
        {
            var tcs = new TaskCompletionSource <FbLoginResult>();

            FacebookLoginActivity.SignOut(tcs);
            return(tcs.Task);
        }
コード例 #2
0
        public static void FacebookLoginAsync(Action <FBLoginResult> callback)
        {
#if __ANDROID__
            FacebookLoginActivity.OnLoginCompleted(callback);
            var fbIntent = new Intent(Xamarin.Forms.Forms.Context, typeof(FacebookLoginActivity));
            fbIntent.PutExtra("Permissions", "email");
            Xamarin.Forms.Forms.Context.StartActivity(fbIntent);
#endif
        }
コード例 #3
0
        public Task <FbLoginResult> SignIn()
        {
            var tcs = new TaskCompletionSource <FbLoginResult>();

            FacebookLoginActivity.OnLoginCompleted(tcs);
            var fbIntent = new Intent(Xamarin.Forms.Forms.Context, typeof(FacebookLoginActivity));

            fbIntent.PutExtra("Permissions", "email");
            Xamarin.Forms.Forms.Context.StartActivity(fbIntent);
            return(tcs.Task);
        }