I'm using in the function getLogoutUr开发者_Go百科l()
in order to enable to the user to log out.
When the user is on url page with parameters there is a problem. If the user will press on logout link which directs to A.php
page which is including header command. The header url is (example):
https://www.facebook.com/logout.php?next=http://bla.net?x=100&y=200&z=120
it will redirect to:
http://bla.net?x=100
and not to the full URL.
I've tried to use in urlencode
on http://bla.net?x=100&y=200&z=120
but it didn't help. It's redirecting to Facebook home page.
I'd like to get any help. Thanks in advance.
That was a known bug in the old PHP SDK , as far as I remember. If you have not switched to the new PHP SDK, I would recommend doing that. But as a workaround for your current problem - use the JavaScript SDK to logout ( either thru AJAX or just echoing out the js snippet from your PHP code). Redirect to your desired URL in it's callback function:
FB.logout(function(response) {
window.location="redirect URL";
});
Hope that helps.
精彩评论