Access token removed in Facebook Android SDK 4.0

Che picture Che · Apr 9, 2015 · Viewed 13.3k times · Source

I am using Facebook Android SDK 4.0 (newly updated version). I logged in to my app after the initial setup. Then I exited from my app. If again start my app, user is not in the logged in state. When I use debugger, it shows "ACCESS TOKEN REMOVED". What is the procedure to check whether the user is in logged in state using Access Token?

I have tried new log in method (according to newer version 4.0) in which they mentioned about log in process. I have done it. But whenever I open up Access Token state is "ACCESS TOKEN REMOVED". I checked App id, Package name, Activity name in dash board settings. All are correct. Help me to find solution for this problem.

Answer

Reham Mokhtar picture Reham Mokhtar · Apr 27, 2015

you can get access_token by using loginResult.getAccessToken().getToken(); as following code

 LoginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
        @Override
        public void onSuccess(LoginResult loginResult) {

          String accessToken= loginResult.getAccessToken().getToken();

        }