title: After Facebook login the profile is null
body: <p>I searched StackOverflow but I didn't find an answer. I need the first name and last name of a profile from Facebook after login. The profile is always null after login. How to solve this problem?</p>
  
  <p>Here my code:</p>
  
  <pre><code>private CallbackManager callbackManager;
  private TextView textView;
  
  private AccessTokenTracker accessTokenTracker;
  private ProfileTracker mProfileTracker;
  
  private FacebookCallback&lt;LoginResult&gt; callback = new FacebookCallback&lt;LoginResult&gt;() {
  
      @Override
      public void onSuccess(LoginResult loginResult) {
          mProfileTracker = new ProfileTracker() {
              @Override
              protected void onCurrentProfileChanged(Profile profile, Profile profile2) {
                  Log.v("facebook - profile", profile2.getFirstName());
                  mProfileTracker.stopTracking();
              }
          };
          mProfileTracker.startTracking();
          AccessToken accessToken = loginResult.getAccessToken();
          Profile profile = Profile.getCurrentProfile();
          displayMessage(profile);
          register(profile);
      }
  
      @Override
      public void onCancel() {
  
      }
  
      @Override
      public void onError(FacebookException e) {
  
      }
  };
  
  public FBLoginFragment() {
  
  }
  
  
  @Override
  public void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
      FacebookSdk.sdkInitialize(getActivity().getApplicationContext());
  
      callbackManager = CallbackManager.Factory.create();
  
      accessTokenTracker= new AccessTokenTracker() {
          @Override
          protected void onCurrentAccessTokenChanged(AccessToken oldToken, AccessToken newToken) {
  
          }
      };
  
      mProfileTracker = new ProfileTracker() {
          @Override
          protected void onCurrentProfileChanged(Profile oldProfile, Profile newProfile) {
              displayMessage(newProfile);
          }
      };
  
      accessTokenTracker.startTracking();
      mProfileTracker.startTracking();
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      return inflater.inflate(R.layout.fragment_main, container, false);
  }
  
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
      super.onViewCreated(view, savedInstanceState);
      LoginButton loginButton = (LoginButton) view.findViewById(R.id.login_button);
      textView = (TextView) view.findViewById(R.id.textView);
  
      loginButton.setReadPermissions(Arrays.asList("public_profile", "user_friends"));
      loginButton.setFragment(this);
      loginButton.registerCallback(callbackManager, callback);
  
  }
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if (callbackManager.onActivityResult(requestCode, resultCode, data))
          return;
  }
  
  private void displayMessage(Profile profile){
      if(profile != null){
          textView.setText(profile.getName());
      }
  }
  
  private void register(Profile profile){
      new Register().execute(profile.getFirstName(), profile.getLastName());
  }
  
  @Override
  public void onStop() {
      super.onStop();
      accessTokenTracker.stopTracking();
      mProfileTracker.stopTracking();
  }
  @Override
  public void onResume() {
      super.onResume();
      Profile profile = Profile.getCurrentProfile();
      displayMessage(profile);
  }
  }
  </code></pre>
  
  <p>In manifest I have <code>&lt;uses-permission android:name="android.permission.INTERNET"/&gt;</code></p>