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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.