Ejemplo n.º 1
0
        public void Authenticate(Action callback)
        {
            var intent = _facebookService.GetAuthenticateUI(_activity, (account) =>
            {
                if (account != null)
                {
                    AccountStore.Create(_activity).Save(account, Config.FACEBOOK_SERVICE_ID);
                    if (callback != null)
                    {
                        callback();
                    }
                }
            });

            _activity.StartActivity(intent);
        }
Ejemplo n.º 2
0
        public void Authenticate(Action callback)
        {
            var presentingController = UIApplication.SharedApplication.KeyWindow.RootViewController;
            var controller           = _facebookService.GetAuthenticateUI((account) =>
            {
                if (account != null)
                {
                    AccountStore.Create().Save(account, Config.FACEBOOK_SERVICE_ID);
                    if (callback != null)
                    {
                        callback();
                    }
                }
                presentingController.DismissViewController(true, null);
            });

            presentingController.PresentViewController(controller, true, null);
        }