So I am encountering some weird problems with the Facebook SDK. I use both the JS SDK as the PHP SDK. To log a user out I use the following onclick:
<a href="/logout/" onclick="FB.logout ();">Log out</a>
After I clicked that link, when I try to perform any JS SDK call, like: FB.getAuthResponse (); it returns, as expected, null.
But after clicking the link, when I use the PHP SDK to check if someone is logged in, or just use the following SDK function: $this -> facebook -> getAccessToken (); it returns a valid token as if I am still logged in.
What am I missing here? By the way, do you need some of my PHP code where I check for login?
Thanks in advance!
$fb->api('me');in php returns something? I ask that because FB PHP SDK just caches access token sogetAccessToken()not always returns the real working token