在Facebook的Andr​​oid SDK中4.0移除访问令牌

问题描述:

我使用Facebook的Andr​​oid SDK中4.0(最近更新的版本)。我登录到我的应用程序的初始设置后。然后,我从我的应用程序退出。如果重新开始我的应用程序,用户是不是在登录状态。当我使用调试器,它显示访问令牌中删除。什么是检查是否使用访问令牌登录状态,用户的程序吗?

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?

我已经(根据较新的4.0版本)中,他们提到登录过程中尝试新的登录方法。我已经做了。但每当我打开访问令牌状态是可信令牌中删除。我检查应用程序ID,包名称,在仪表板设置活动名称。所有是正确的。帮我找到这个问题的解决方案。

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.

你可以得到使用access_token 。loginResult.getAccessToken()为gettoken(); 如下code

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();

        }