async Task method()
        {
            var auth = new FacebookAuthenticator(
                "2063574180384090",
                "email", this);

            var authenticator = auth.GetAuthenticator();

            var viewController = authenticator.GetUI();

            _navigationStack = ((AppDelegate)_Managers[0]).Window.RootViewController;
            SafariServices.SFSafariViewController c = null;
            c = (SafariServices.SFSafariViewController)viewController;

            viewController = c;
            _navigationStack.PresentViewController(viewController, true, null);
            //if (result.Authenticated)
            //{
            //    ExecuteCallBack(new FingerPrint { IsValid = true });
            //}
            //else
            //{
            //    OnError(new string[] { ServiceKey + " Reported " + result.Status.ToString(), result.ErrorMessage });
            //}
        }
Example #2
0
        private void OnFacebookLoginButtonClicked(object sender, EventArgs e)
        {
            var auth           = new FacebookAuthenticator(Configuration.ClientId, Configuration.Scope, this);
            var authenticator  = auth.GetAuthenticator();
            var viewController = authenticator.GetUI();

            PresentViewController(viewController, true, null);
        }
Example #3
0
        private void OnFacebookLoginButtonClicked(object sender, EventArgs e)
        {
            // Display the activity handling the authentication
            var authenticator = _auth.GetAuthenticator();
            var intent        = authenticator.GetUI(this);

            StartActivity(intent);
        }
Example #4
0
        private void StartFacebookAuth(object sender, EventArgs e)
        {
            _facebookAuthenticator = new FacebookAuthenticator(Configuration.ClientId, Configuration.Scope, ViewModel);

            Xamarin.Auth.OAuth2Authenticator authenticator = _facebookAuthenticator.GetAuthenticator();
            UIViewController view = authenticator.GetUI();

            PresentViewController(view, true, null);
        }
Example #5
0
        private void OnFacebookLoginButtonClicked(object sender, EventArgs e)
        {
            _authFacebook = new FacebookAuthenticator(Configuration.ClientId, Configuration.Scope, ViewModel);

            Xamarin.Auth.OAuth2Authenticator authenticator = _authFacebook.GetAuthenticator();
            Intent intent = authenticator.GetUI(Activity);

            StartActivity(intent);
        }
Example #6
0
        partial void FacebookLoginButton_TouchUpInside(UIButton sender)
        {
            //animate indicator
            FacebookConnectedImage.Image = UIImage.FromBundle("loading-indicator");
            Platform.AnimateRotation(FacebookConnectedImage);
            //push fb login
            var auth           = new FacebookAuthenticator(Configuration.FbClientId, Configuration.Scope, this);
            var authenticator  = auth.GetAuthenticator();
            var viewController = authenticator.GetUI();

            PresentViewController(viewController, true, null);
        }
Example #7
0
 public override void OnViewModelChanged(object sender, PropertyChangedEventArgs e)
 {
     base.OnViewModelChanged(sender, e);
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.FBLoaderImage))
     {
         if (ViewModel.IsBusy)
         {
             AnimateImage(twitterNetworkLoader);
             var auth          = new FacebookAuthenticator(Configuration.FbClientId, Configuration.Scope, ViewModel);
             var authenticator = auth.GetAuthenticator();
             var intent        = authenticator.GetUI(this.Activity);
             this.StartActivity(intent);
             AnimateImage(fbNetworkLoader);
         }
         if (!ViewModel.IsBusy)
         {
             fbNetworkLoader.ClearAnimation();
         }
         ChangeSocialNetworkTextColor();
     }
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.TwitterLoaderImage))
     {
         if (ViewModel.IsBusy)
         {
             var auth          = new TwitterAuthentificator(Configuration.ConsumerKeyTwitter, Configuration.ConsumerSecretTwitter, Configuration.Scope, ViewModel);
             var authenticator = auth.GetAuthenticator();
             var intent        = authenticator.GetUI(this.Activity);
             this.StartActivity(intent);
             AnimateImage(twitterNetworkLoader);
         }
         if (!ViewModel.IsBusy)
         {
             twitterNetworkLoader.ClearAnimation();
         }
         ChangeSocialNetworkTextColor();
     }
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.InstaLoaderImage))
     {
         if (ViewModel.IsBusy)
         {
             var auth          = new InstagramAuthenticator(Configuration.ConsumerKeyInsta, string.Empty, Configuration.InstaScope, ViewModel);
             var authenticator = auth.GetAuthenticator();
             var intent        = authenticator.GetUI(this.Activity);
             this.StartActivity(intent);
             AnimateImage(instaNetworkLoader);
         }
         if (!ViewModel.IsBusy)
         {
             instaNetworkLoader.ClearAnimation();
         }
         ChangeSocialNetworkTextColor();
     }
 }