Exemple #1
0
        /*****************************************************************/
        // METHODS
        /*****************************************************************/
        #region Methods

        /// <summary>
        /// Log into facebook
        /// </summary>
        /// <param name="callback"></param>
        public void LogIn(IFacebookLoginCallback callback)
        {
            FacebookLoginCallback = callback;
            if (!LoggedIn)
            {
                LoginManager.Instance.LogInWithReadPermissions(Activity, FacebookService.Permissions);
            }
            else
            {
                FacebookLoginCallback.OnSuccess();
            }
        }
Exemple #2
0
        /*****************************************************************/
        // METHODS
        /*****************************************************************/
        #region Methods

        /// <summary>
        /// Login to facebook
        /// </summary>
        /// <param name="callback"></param>
        public void LogIn(IFacebookLoginCallback callback)
        {
            this.FacebookLoginCallback = callback;

            new LoginManager().LogIn(FacebookService.Permissions, null, (result, error) =>
            {
                if (result.IsCancelled)
                {
                    FacebookLoginCallback.OnCancel();
                }
                else if (error != null)
                {
                    FacebookLoginCallback.OnError(error.ToString());
                }
                else
                {
                    FacebookLoginCallback.OnSuccess();
                }
            });
        }