private void finishInit() {
   setOnClickListener(new LoginClickListener());
   setButtonText();
   if (!isInEditMode()) {
     sessionTracker = new SessionTracker(getContext(), new LoginButtonCallback(), null, false);
     fetchUserInfo();
   }
 }
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   if (sessionTracker != null && !sessionTracker.isTracking()) {
     sessionTracker.startTracking();
     fetchUserInfo();
     setButtonText();
   }
 }
 /**
  * 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 FacebookException if errors occur during the loading of user information
  */
 public void setSession(Session newSession) {
   sessionTracker.setSession(newSession);
   fetchUserInfo();
   setButtonText();
 }