Facebook上的android:closeAndClearTokenInformation后无法登录

Luc*_*cio 5 android facebook facebook-access-token

大家好我使用Android facebook sdk 3.0.1并在那里使用我的登录方法:

public void connect(){

    Session.openActiveSession(HTFacebook.context, true, new Session.StatusCallback() {

          // callback when session changes state
          @Override
          public void call(Session session, SessionState state, Exception exception) {
              if(exception != null){
                  Log.e(TAG,"exception----->" + exception.getMessage());
              }
              if(session.isOpened()){
                  List<String> permissions = session.getPermissions();
                  if(!isSubsetOf(PERMISSIONS, permissions)){
                      Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest(HTFacebook.context, PERMISSIONS);
                      session.requestNewReadPermissions(newPermissionsRequest);
                      return;
                  }
                  MeRequest(session, null, null);
            }
          }
        }); 
}
Run Code Online (Sandbox Code Playgroud)

这个方法让我正确登录,但是当我退出时我无法登录更多并且facebook收到错误(参见附图)在此输入图像描述

这是我的注销方法:

public void logout(){

if(Session.getActiveSession().isOpened()){
    Session.getActiveSession().closeAndClearTokenInformation();
    Session.getActiveSession().close();
    Session.setActiveSession(null);


    this.userInfo=null;
    this.userId=null;
}else{
//already logged out
}
}
Run Code Online (Sandbox Code Playgroud)

我想清除令牌信息,因为我想要更改用户.那么我如何在closeAndClearTokenInformation()之后生成一个正常工作的新会话?

PS:如果我删除了closeAndClearTokenInformation方法,所有工作正常,但我无法更改用户,如果我使用Facebook应用程序的不同用户登录我的应用程序我仍然是旧的.

谢谢!