Hello all, for the most part I’ve successfully implemented Facebook Connect into my restful_authentication setup using Facebooker and madebymany’s tutorial. The only problem I have is when I manually log out of Facebook through facebook.com.
To log out of my site I am using a conditional statement to check whether a user is using Connect or not( facebook_session ). If not, the logout link simply destroys the restful_authentication session. If they are, the logout link is:
<a href="#" onclick='FB.Connect.logoutAndRedirect("/logout")>Logout</a>
This works fine unless I manually log out of facebook. Now, facebook_session still registers as true and the logoutAndRedirect link never redirects to “/logout” and the user remains logged in.
Is there a better way to check if a user is logged in to Facebook? facebook_session appears to only be destroyed when called from within the application. Or am I missing something here?
Thanks a Bunch!