Пример #1
0
 /**
  * Set the Session object to use instead of the active Session. Since a Session cannot be reused,
  * if the user logs out from this Session, and tries to log in again, a new Active Session will be
  * used instead.
  *
  * <p>If the passed in session is currently opened, this method will also attempt to load some
  * user information for display (if needed).
  *
  * @param newSession the Session object to use
  * @throws com.facebook.FacebookException if errors occur during the loading of user information
  */
 @Override
 public void setSession(Session newSession) {
   super.setSession(newSession);
   if (loginButton != null) {
     loginButton.setSession(newSession);
   }
   fetchUserInfo();
   updateUI();
 }
Пример #2
0
 /**
  * @throws com.facebook.FacebookException if errors occur during the loading of user information
  */
 @Override
 public void onResume() {
   super.onResume();
   fetchUserInfo();
   updateUI();
 }
Пример #3
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setRetainInstance(true);
 }