views:

157

answers:

3

I need a Facebook application that kind of sit in the 'background' of user operations. Once the app is installed by the user, it will keep on sending the user's status updates, new friend connections etc to another web app of mine. It will keep on getting info no matter whether the app page is open or not.

My question is -- is this possible? So far, I've played around a simple iFrame app written with the Java API. It seems that it can only perform data collections whenever the page is hit.

EDIT: Privacy is definitely a valid concern here. But the application will definitely prompt for permission even if FB API is not built in to do so.

A: 

Nope. Facebook doesn't want apps having too much user data in general, and certainly doesn't want them accessing it when the user is not actively interacting with the application.

Heck, infinite session keys aren't even supported1 anymore. Those still around have all been grandfathered in.

1Ok, you can do some security tricks and get them still. However, relying on their existence for non-mobile apps is a bad idea. Even with an infinite session, you're reduced to polling for updates; there's no way to get Facebook to inform you of updates when the user is not actively using your application.

Kevin Montrose
Infinite sessions by default were removed but infinite session keys are still supported through the offline_access extended permission. See the bottom half of this page: http://wiki.developers.facebook.com/index.php/Authorizing_Applications#About_Session_Keys
Karl B
+1  A: 

Tho I wont suggest it, but if you create an "app" which has an associated user account, which you then ask the user of the facebook app to add as a friend, then you can achieve what you want in the question.

e.g., lets say your app was iFacebook - then you create a regular user account called iFacebook Friend, and ask users of your iFacebook app to add iFacebook Friend to their friends(*) list. Then you can scrape data off your app users via the regular facebook account 'iFacebook Friend'.

However, doing so is probably going to violate some usage policies of facebook, and can likely to get you banned, or reported as a privacy violating app. However, if what your app does is useful enough, some people will happily let privacy go...

(*) you can entice them into doing this by giving incentives, such as bonus points, extra exclusive 'stuff' that only those who have added the friend would get.

Chii
While your answer is technically right, I want to vote it down because it's just wrong--morally, that is. I hope you use your skills for good and not evil, Chii :)
ewall
well, i try to use my skill for good, but then sometime evil pays a bit better unfortunately...however, there are some things i wont do, and the answer i had above is one of those ones i probably wont do =)
Chii
Creating an associated user account is definitely an interesting approach here. Thanks for the info. :)
tomato
+1  A: 

You can ask the user for the offline_access extended permission by using the fb:prompt-permission FBML tag: <fb:prompt-permission perms="offline_access">Can I have access to your data all the time?</fb:prompt-permission>, store the user's session key in your database and then query the Facebook API as needed. (You may need other extended permissions if there's other data you want to access that isn't a standard API call.)

Note that this isn't against the terms of service, but you won't be allowed to store any of the data you receive for more than 24 hours.

Karl B
Thanks for this answer. Now I'll go dig up how to do this the Java API... :D
tomato