Jump to content

Destroy Session Issue


Alicia

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/268925-destroy-session-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.