简体   繁体   中英

Facebook SDK for android - getting access token by passing username and password

Is there a way to get access token by passing the username and password with a method (Not to use the authorize method of the SDK)??

I want to have something like this:

private String GetFacebookAccessToken(String username , String password ){
 ...
}

In my app I want to have 2 facebook accounts , I want each time to login with a different account , I have the username & password saved.

Please help...

See how this is implemented in this sample: https://github.com/facebook/facebook-android-sdk/tree/master/samples/SwitchUserSample

That uses the LoginBehavior.SUPPRESS_SSO which is what you're seeing.

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