0

I am using fandjango app for handling facbook user information. If user is logout from facebook and hit url from same browser, I am getting error
Error validating access token: The session is invalid because the user logged out.
Can somebody tell me, how to solve this problem and how to identify if user is log out from facebook or not.

Invincible
  • 412
  • 3
  • 19

1 Answers1

0

You can check the facebook object of your request:

def view(request):
    if request.facebook and hasattr(request.facebook, 'user') and request.facebook.user is not None:
        // Here you are sure that request.facebook.user is logged in
Federico
  • 755
  • 6
  • 6
  • when user is logged out, you will still able to get request.facebook object. SO from this way we can not identify. – Invincible May 27 '12 at 08:22