For some reason Profile.getCurrentProfile() shows up null at times right after logging into FaceBook, using FB API v4.0.
This is causing problems for me
Following to Sufian's answer, you can also save the new profile to Profile class:
@Override
public void onSuccess(LoginResult loginResult) {
ProfileTracker profileTracker = new ProfileTracker() {
@Override
protected void onCurrentProfileChanged(Profile oldProfile, Profile currentProfile) {
this.stopTracking();
Profile.setCurrentProfile(currentProfile);
}
};
profileTracker.startTracking();
}