drzdu44226 2010-11-21 14:01
浏览 33
已采纳

Facebook连接 - 注销+销毁会话

I need to get an anchor tag to delete a session in php + log the user out of Facebook. Before I used Facebook connect, I was using this php code to destroy the session:

    if(isset($_GET['logoff'])){
    $_SESSION = array();

 session_destroy();

 header("Location: /");
 exit;
}

And this for the anchor tag:

<a href='?logoff'>Log Out</a>

I now need the same anchor tag to go to the $logoutUrl + destroy the session.

  • 写回答

2条回答 默认 最新

  • dongxiaoke2018 2010-11-21 14:10
    关注

    I could be wrong but I am pretty sure Facebook saves the access token in a cookie called fbs_YOURAPPID. So just destroy that cookie and you should sign-out.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部