简体   繁体   中英

facebook api logout user for app authorization

I'm building an app where I want to allow users to be able to set up more than one facebook account with my application, so it would be best for me to be able to log them out of facebook before they add a new account so that they can enter their information for their new account and not just be forwarded back to my site because the user already has access with the account that they're logged in with. Others have said that it is not possible to log out a user with the facebook api, but I know that it is because hootsuite.com will log me out of my facebook account whenever I try to add a new one. Actually, I know that with twitter you just add &force_login=true to the end of the url to make it so that the user has to enter their credentials. I'm looking for a similar method for facebook. Does anyone know of anything? Thanks!!

Calling FB.logout() via the JS SDK will log the user out of Facebook: https://developers.facebook.com/docs/reference/javascript/FB.logout/

It is also possible to force the user to re-authenticate: https://developers.facebook.com/docs/reauthentication/

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