I am using facebook-php-sdk
(github) for facebook login on my localhost page, when i logout, the page is not redirecting..
And the same page i can see the my profile information in arrays, even after i pressed logout then data should be empty on page but its display all information.
i have used below code, but its not redirect
$logoutUrl = $facebook->getLogoutUrl(array('next' => 'http://google.com'));
<?php if ($user): ?>
<a href="<?php echo $logoutUrl; ?>">Logout</a>
<?php else: ?>
<div>
Login using OAuth 2.0 handled by the PHP SDK:
<a href="<?php echo $loginUrl; ?>">Login with Facebook</a>
</div>
<?php endif ?>