Alicia Posted September 30, 2012 Share Posted September 30, 2012 Hi, Can any guru can advise me on this? I have used this code to capture name, email and etc from facebook connect without any problem function fbLogin() { FB.login(function(response) { if (response.session) { //user is logged in, reload page window.location.reload(true); } else { // user is not logged in } }, {perms:'read_stream,publish_stream,offline_access,email'}); <INPUT TYPE="BUTTON" onclick="fbLogin()" value="login" src="images/fb"> I managed to print data with this after login echo "$user"; // user facebook id echo $user_info['email']; echo $user_info['name']; but now my facebook logout script to destroy the sessions are not working. include_once "facebook-php-sdk/src/facebook.php"; setcookie('fbs_'.$facebook->getAppId(), ”, time()-100, '/', 'http://www.myste.com'); session_destroy(); header('Location: /'); may i know why i am still not logout yet after loading the script. I tried to search online but none solution seem to work to destroy facebook session from my site. please advise. Quote Link to comment https://forums.phpfreaks.com/topic/268925-destroy-session-issue/ Share on other sites More sharing options...
Alicia Posted September 30, 2012 Author Share Posted September 30, 2012 anyone has idea how to solve this prob? thanks Quote Link to comment https://forums.phpfreaks.com/topic/268925-destroy-session-issue/#findComment-1381905 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.