简体   繁体   English

Facebook注销SDK

[英]Facebook Logout SDK

i have created my facebook application,i use $this->facebook->getLogoutUrl(); 我已经创建了我的Facebook应用程序,我使用$this->facebook->getLogoutUrl(); to logout a user,but it will causes facebook.com logout too.. 注销用户,但这也会导致facebook.com注销。

so any idea to prevent this? 所以有什么想法可以防止这种情况?

Actually there is a problem in new version of PHP Sdk, and 实际上,新版本的PHP Sdk中存在问题,并且

 $facebook->getLogoutUrl(); 

not working, 不起作用

you can try it to set other file logout.php in that you have to start session and then destroy it.. 您可以尝试设置其他文件logout.php,因为您必须启动会话然后销毁它。

logout.php logout.php

 session_start();
 session_destroy();

it's working, i use it. 它正在工作,我用它。

Maybe try to search and read similar threads? 也许尝试搜索和阅读类似的主题?

Facebook Oauth Logout Facebook Oauth注销
Facebook php SDK getLogoutUrl() problem Facebook php SDK getLogoutUrl()问题

Because afaik you 因为afaik你

  • Don't have to logout user from application which runs as facebook page/app 不必从以Facebook页面/应用程序运行的应用程序中注销用户
  • You shouldn't log out user on Facebook, if you are using oAuth to let him login to your website with his facebook account 如果您使用oAuth允许用户使用他的facebook帐户登录到您的网站,则不应在Facebook上注销用户

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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