Facebook OAuth2 Logout does not remove fb_ cookie

夙愿已清 提交于 2020-01-02 15:03:23

问题


This used to work so I'm not sure what went wrong. User is able to login to Facebook just fine. Logging out is the problem.

I log the user out by redirecting them to the Facebook logout php script. $facebook->getLogoutUrl();

When the user clicks on that link, they are logged out of the Facebook page. However, when they are directed back to my site, I notice the fb_ cookie is still there. PHP SDK still returns the user fb session details. The strange thing is going to www.facebook.com shows I'm already logged out of Facebook.

What could be going wrong here? Thanks, I'm stumped :(.


回答1:


Okay, in the end, what I did was generate a getLogoutUrl() with a next= address url to my logout script which will remove the facebook cookie by setSession(null).



来源:https://stackoverflow.com/questions/3385499/facebook-oauth2-logout-does-not-remove-fb-cookie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!