Exemple #1
0
        private void connectAsRememberedUser()
        {
            m_LoginResult  = FacebookService.Connect(AppSettings.Instance.LastAccessToken);
            m_LoggedInUser = m_LoginResult.LoggedInUser;
            FormFacebookApplication fbAppForm = new FormFacebookApplication(m_LoggedInUser);

            fbAppForm.ShowDialog();
            this.Invoke(new Action(this.Close));
        }
Exemple #2
0
 private void loginAndInit()
 {
     try
     {
         m_LoginResult = FacebookService.Login(k_AppId, sr_Permission);
         if (!string.IsNullOrEmpty(m_LoginResult.AccessToken))
         {
             m_LoggedInUser = m_LoginResult.LoggedInUser;
             AppSettings.Instance.RememberUser = this.checkBoxRememberUser.Checked;
             FormFacebookApplication fbAppForm = new FormFacebookApplication(m_LoggedInUser);
             fbAppForm.ShowDialog();
             this.Invoke(new Action(this.Close));
         }
         else
         {
             MessageBox.Show(m_LoginResult.ErrorMessage);
         }
     }
     catch
     {
         MessageBox.Show("Login Failed. Please try again later.");
         this.Invoke(new Action(this.Close));
     }
 }