1
votes

can you explain to me how can i call logout function of facebook php sdk, without that logged user have to click on logout link generated with the $facebook->getLogoutUrl.

2
possible duplicate of Facebook PHP SDK logout - user198003

2 Answers

1
votes

I think theres no method to do it.. how about making a curl request for the url generated using $facebook->getLogoutUrl.

in their js api they have provided

FB.logout

http://developers.facebook.com/docs/reference/javascript/FB.logout/

0
votes

Or you could use header("Location: ".$facebook->get:LogoutUrl());

That would automatically redirect the user, without them having to click anything

Curl might not work as the curl request may not have the same access token