views:

255

answers:

1

In the Facebook javascript api there is a login function in which you specify extended permissions: http://developers.facebook.com/docs/reference/javascript/FB.login

One of these permissions is offline access. So I can save the facebook user's session key and assume it will not expire for a long time. The question I have is simple - how do I use the session key? I understand that the session key will last longer, but I don't understand how to use it in the Facebook API. For one of my products, a user must restart his/her browser and I would like to recognize them when they restart. The problem is that they are logged out of facebook, so they must login on my site again where I would rather just use offline access. Sample code would be great!

Thanks

A: 

Offline access allows you to use the user's access token on the Facebook Graph API indefinitely (unless they revoke your application's access).

It is not intended for logging the user back in. It's intended for you to be able to access their profile (and potentially do stuff to it, if you have permission) at all times, not just when they have a live session on your site.

ceejayoz