Automatically logout when user logout from Facebook?

Try adding a listener for when the user logs out.

Up vote 1 down vote favorite 1 share g+ share fb share tw.

Currently, when user logout, the fb_*_user_id sessions is still returns users ID, I tried to call $fb->api('/me'), and still, all users data is still there.. I'm really sorry for asking this question because I'm quite sure it's being ask all the time, But seriously, FB API giving me a headache. I've tried some of the code from solved question, but it doesn't seems to work, and most of them are outdated. I'm using PHP SDK and hosting on localhost.

Thanks $facebook = new Facebook($config); var_dump($facebook); echo 'UID : '. $facebook->getUser(); if($facebook->getUser()==0){ echo 'Not login! '; echo "getLoginUrl().

"'>Login"; }else{ $fbme = $facebook->api('/me'); echo 'Welcome, "'. $fbme'name'. '"!

'; echo "getLogoutUrl(). "'>Logout"; } php facebook login facebook-php-sdk logout link|improve this question edited Feb 14 at 6:35Somnath Muluk2,944929 asked Jan 11 at 16:17Ahmad Hafiz103.

Some code would be helpful – Darvex Jan 11 at 16:24.

Try adding a listener for when the user logs out; FB. Subscribe('auth. Logout', function(response){ // Do something to let your program know that the user is now logged out.

}); Add your own facebook logout to your site with FB.logout(). This should clear your website's fb session as well as log them out of facebook.com.

All PHP I mean. – Ahmad Hafiz Jan 11 at 19:39.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions