コード例 #1
0
        private void loginAndInit()
        {
            try
            {
                LoginResult result = FacebookService.Login(
                    m_AppID,
                    "user_about_me",
                    "user_posts",
                    "read_custom_friendlists",
                    "user_photos",
                    "user_friends",
                    "publish_actions",
                    "user_likes",
                    "user_events",
                    "user_status",
                    "user_location",
                    "user_tagged_places",
                    "rsvp_event");

                if (!string.IsNullOrEmpty(result.AccessToken))
                {
                    LoggedInUser = result.LoggedInUser;
                    PictureBoxUser.LoadAsync(LoggedInUser.PictureNormalURL);
                    ButtonLogin.Enabled   = false;
                    ButtonLogout.Enabled  = true;
                    ComboBoxAppID.Enabled = false;
                }
                else
                {
                    throw new Exception(result.ErrorMessage);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
コード例 #2
0
 private void loadUserProfilePicture()
 {
     PictureBoxUser.LoadAsync(FacebookSessionSingleton.Instance.User.PictureSqaureURL);
 }
コード例 #3
0
 private void loadUserProfilePicture()
 {
     PictureBoxUser.LoadAsync(UserSingleton.Instance.LoggedInUser.PictureSqaureURL);
 }