title: How to check if user is logged in with FB SDK 4.0 for Android?
body: <p>A few days ago I implemented FB Login to my APP, and today I found out that most of the things I have implemented are now deprecated. </p>
  
  <p>Before, I was using <code>Session</code> to see if the user was logged in or not. However, that doesn't work with the new SDK.</p>
  
  <p>According to their docs, we can use <code>AccessToken.getCurrentAccessToken()</code> and <code>Profile.getCurrentProfile()</code> to check if the user is already logged in, but I could not make use of those. </p>
  
  <p>I tried something like this: </p>
  
  <pre><code>if(AccessToken.getCurrentAccessToken() == null)
  </code></pre>
  
  <p>I wonder if that would work if I could use it inside of this (which is also provided by FB): </p>
  
  <pre><code>LoginManager.getInstance().registerCallback(callbackManager, new LoginManager.Callback() {...});
  </code></pre>
  
  <p>However, I get a <strong>"Cannot resolve symbol 'Callback'".</strong></p>
  
  <p><strong>EDIT!!!!!!</strong></p>
  
  <p>Alright, so I was able to check if the user is logged in by using the following:</p>
  
  <p><em>On onCreate:</em></p>
  
  <pre><code>accessTokenTracker = new AccessTokenTracker() {
          @Override
          protected void onCurrentAccessTokenChanged(AccessToken oldAccessToken, AccessToken newAccessToken) {
              updateWithToken(newAccessToken);
          }
      };
  </code></pre>
  
  <p>Then, that calles my <code>updateWithToken</code> method:</p>
  
  <pre><code>private void updateWithToken(AccessToken currentAccessToken) {
      if (currentAccessToken != null) {
  
              LOAD ACTIVITY A!
  
      } else {
  
              LOAD ACTIVITY B!
      }
  }
  </code></pre>
  
  <p>Now, the problem is: If the user has used the application and hasn logged in before, I can check for that! But if it is the first time that the user is using the app, <code>updateWithToken</code> is never called by my AccessTokenTracker.</p>
  
  <p>I'd really appreciate if someone could help.</p>
  
  <p>Thanks!</p>