title: How can i find my current login status - facebook API android
body: <p>I am using Facebook Login Button to integrate Facebook Login to my app.</p>
  
  <ol>
  <li><p>When i press Facebook Login Button , it authenticates my Credentials and if successfully done , then change text to Log Out &amp; Go inside my app.</p></li>
  <li><p>Now when i use app and i go out of App and when i again come back to Login Screen. Here i see logout - As i authenticate myself before and i didn't logout.</p></li>
  <li><p>So My question is how to differentiate when i am already logged in or my session is expired ?</p></li>
  </ol>
  
  <p>Here is a code i am using:</p>
  
  <pre><code>LoginButton authButton;
  
  authButton = (LoginButton) findViewById(R.id.authButton);
  // set permission list, Don't forget to add email
  
  authButton.setReadPermissions(Arrays.asList("basic_info", "email"));
  
  authButton.setSessionStatusCallback(new Session.StatusCallback() {
  
          @Override
          public void call(Session session, SessionState state,
                  Exception exception) {
  
              authButton.setReadPermissions(Arrays.asList("basic_info",
                      "email"));
              System.out.println("Inside Call");
              if (session.isOpened()) {
                  fbToken = session.getAccessToken();
  
  
                                  }
  
                              }
                          });
  </code></pre>
  
  <p>.....................................</p>
  
  <p>Thank you very much in advance.</p>
  
  <p>Regards,
  Rakesh</p>