what is the validity of the facebook javascript sdk access token that is stored in the cookie
If I use the facebook javascript and xfbml to get a user to login to my app and grant me offline permissions.
Can I then at the server
- read the cookie set by facebook,
- get the access token
- store it in a db
- and use it over time
or is this access token valid only 开发者_开发百科during the active session "even though I've requested and obtained user permission for offline use"
Yes, you can do everything you stated and user the access token indefinitely if you request "offline_access" from the user. If you don't request offline_access the access token expires after a few hours. The only reason the access token will expire is if the user removes your application or removes the offline access permission from your application.
精彩评论