I’ve implemented in my facebook app logout option, but unfortunately, it errors on rediredt loop..Does anyone know if the facebook sdk, redirects me back to the original page, or to the main page whicj is set in the applications settings in developers.facebook.com administration??
Anyway, is there any possibility how to logout from my app without redirecting?For example with cUrl request to the logout url, is that possible?
I’ve implemented in my facebook app logout option, but unfortunately, it errors on rediredt
Share
You could consider using the FB javascript SDK for doing the logout and then you do not need to redirect (it is also possible to register a javascript callback and use window.location to do that):
FB.logout(function(response) {
// user is now logged out
window.location = “xxxx”;
});
If you want to use the php sdk, you can pass in a “next” parameter, with the page you want to direcrect to:
$location = (string) html_entity_decode($facebook->getLogoutUrl(array(‘next’ => ‘mysite.com’)));