开发者

Facebook OAuth - is there a way to 'clear' previous user?

开发者 https://www.devze.com 2023-01-27 00:20 出处:网络
I\'m writing a Windows Phone App and am using the OAuth interface. When I navigate to the auth url the first time it shows the login UI.Subsequent times I\'m redirected directly to my facebook app pa

I'm writing a Windows Phone App and am using the OAuth interface.

When I navigate to the auth url the first time it shows the login UI. Subsequent times I'm redirected directly to my facebook app page with showing the login UI. Presumably because the login is cached in a cookie or som开发者_Go百科ething. All good so far.

The problem comes in when I need to switch users. Is there a way to force the facebook oauth url to clear previous creds and show the login screen?

Thanks!


Log the user out of Facebook using the url below:

https://www.facebook.com/logout.php?access_token=ACCESS_TOKEN&confirm=1&next=REDIRECT


Now, in order to log a user out of Facebook you need to use this url:

"https://www.facebook.com/logout.php?next="+your_site_url_registered _on_fb+"&access_token="+accessToken
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号