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
Doing it with PHP SDK is really easy, the documentation is just really awfull. You do not need to redirect to Facebook. You just have to clear the session that the Facebook class sets, there is a function for that in the Facebook base class called destroySession(). Here I'm doing it on a get.
require_once('libs/facebook.php');
$facebook = new Facebook(array(
'appId' => '1121111110112',
'secret' => 'bcfsaasaaaaaa2b7adsae3a4dd5'
));
if(isset($_GET['action']) && $_GET['action'] === 'logout'){
$facebook->destroySession();
}
The $facebook->getLogoutUrl() logs the user out of Facebook.