facebook php-sdk not logging out
- by Meisam Mulla
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.