facebook php-sdk not logging out

Posted by Meisam Mulla on Stack Overflow See other posts from Stack Overflow or by Meisam Mulla
Published on 2011-12-26T05:14:39Z Indexed on 2012/07/03 3:16 UTC
Read the original article Hit count: 229

I'm having a hard time getting this to work. I use the following to generate the logout url:

$logout = "https://www.facebook.com/logout.php?next=" . urlencode('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']) . "&access_token=" . $facebook->getAccessToken();

Which generates the correct (worked with the last version) url:

https://www.facebook.com/logout.php?next=http%3A%2F%2F...&access_token=AA....ZD

However this does not actually log the user out. I tried using

$facebook->getLogoutUrl(array('next' => 'myurl')) 

which generates pretty much the same url. This also did not work. I am lost as to why its not logging the user out. I actually tried manually putting the address into the address bar but it redirects me to the Facebook homepage.

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook