How to get current access token in Facebook Android SDK V4?
问题 I want to check whether the user is logged in or not within the main FragmentActivity but although the user is logged in AccessToken.getCurrentAccessToken() returns null. What am I doing wrong in the code below ? public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); context = this; FacebookSdk.sdkInitialize(context); callbackManager = CallbackManager.Factory.create(); AccessToken accessToken = AccessToken.getCurrentAccessToken(); if (accessToken != null) { if (