简体   繁体   中英

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. 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. 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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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