コード例 #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);
        }
コード例 #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);
        }