简体   繁体   English

Android Facebook SDK 3.0-如何以其他用户身份登录?

[英]Android Facebook SDK 3.0 - How to log in as another user?

I am using the official Facebook SDK 3.0 for Android in my app. 我在我的应用中使用的是官方的Android版Facebook SDK 3.0。 I want to be able to disconnect and reconnect as a different user inside my application. 我希望能够以其他用户的身份断开连接并重新连接到我的应用程序中。 For the logout i use this code: 对于注销,我使用以下代码:

mSession.closeAndClearTokenInformation();

this is the code for login: 这是登录代码:

Session.openActiveSession(this, true, statusCallback);

When I try to reconnect i don't see the facebook login activity but I login as the user has logged out. 当我尝试重新连接时,我没有看到Facebook登录活动,但由于用户已注销而登录。 How can I really be able to logout and subsequently log in as another user? 我怎样才能真正注销并随后以另一个用户身份登录?

try to close the active session onDestroy method or try something like this 尝试关闭活动会话的onDestroy方法或尝试类似的事情

public void onDestroy() {
        this.closeSession();
        super.onDestroy();
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM