Closed (won't fix)
Project:
Drupal for Facebook
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2009 at 15:35 UTC
Updated:
6 Jan 2011 at 23:14 UTC
Hi Dave,
You store one Facebook ID and infinite session key with the fb_app node.
I will have the need for some of my users to enable infinite session for themselves.
How do I achieve that? Do I put them thru an infinite session test type of page?
Can you please comment.
Thanks,
Peter
Comments
Comment #1
Dave Cohen commentedFacebook doesn't use the words "infinite session" so much any more. What you're interested in is the offline access extended permission. See http://wiki.developers.facebook.com/index.php/Extended_permissions
The fb_user module currently provides a simple for allowing users to add extended permissions. Right now this only works on FBML canvas pages, but should eventually work via fbConnect as well. Also you can just as easily create a page with the right fb:prompt-permission tags for your app.
If you get the user to approve that permission, then Drupal for Facebook will save their 'infinite' session in the fb_user_app table, and calling fb_api_init() with their facebook user id will get you connected to facebook as that user. The fb_actions module has an action for cron tasks which does this.
The fb_infinite module serves a different purpose. It enables the Drupal admin to save changes to the facebook config, with the permission of the app developer. This is necessary for registering feed templates, for example. Although you wont need fb_infinite even for that, if you log in via fbConnect or admin through canvas pages. One day I hope to get rid of fb_infinite.module, but for now it can be useful.
Make sense?
Comment #2
alviso commentedMakes sense.
Thanks for the insight.
Peter
Comment #3
Dave Cohen commentedbetter support in 3.x branch.