Facebook PHP SDK - will not logout properly

前端 未结 8 780
滥情空心
滥情空心 2021-02-09 17:21

I\'ve been searching for hours for the solution to this problem but can\'t find one that works for me. When i click \"Logout\" on my site the user information is still visible a

8条回答
  •  庸人自扰
    2021-02-09 17:23

    I remember this was a huge pain in one of my apps. It seems that finally what seemed to work was:

    jQuery(function() {
       /* ... */
       FB.logout();
       window.location = 'some url';
    });
    

    I should be about the same without jQuery (just run FB.logout() at page load). AFAIR I just could not get this to work on the server-side in PHP. Hope it helps :).

提交回复
热议问题