Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

facebook connect does not clear session cookie on logout

I'm doing some integration with Facebook on a project (using graph api) and everything was working fine until now I discovered that facebook doesn't clear my session when I click on the logout url. I'm doing logout through php, not javascript, so the logout url looks like:

https://www.facebook.com/logout.php?next=url&access_token=token

After clicking on that link the user is logged out on facebook, but the session still exists on my website. To actually clear the session I have to refresh the page one more time after clicking that url. This is a strange behavior, in my opinion.

What you guys think of this? I tried even to personally remove the facebook cookie, but it is still there, and it is cleared only after I hit the refresh button on my browser.

p.s. to get the facebook session I do something like this:

My_Facebook_Helper::instance()->getSession(); //it should be === null if it doesn't exist

p.p.s. it could be a bug? i don't remember having this issue about a week ago when I first started to implement this

like image 478
misterjinx Avatar asked Nov 29 '10 12:11

misterjinx


1 Answers

I ran into this bug and realized it wasn't that the session wasn't being cleared, but if you have offline access, it will automatically get you a new session.

like image 53
idnk Avatar answered Sep 18 '22 13:09

idnk