views:

264

answers:

1

Since I've seen some pretty fun things done with social networking apis (The twitter image encoding project for example) I decided to try and make a CMS/Blog completely administered via a facebook page or group.

How can I:

  • Connect to a facebook account when the cms is installing and have it persistently connected (no need to re-auth)
  • Have two sessions running at the same time using the facebook php library. (One for the "admin" facebook account and one for the user who is currently logged into facebook and viewing the site
  • Get the newest notes (for converted into blog entries by the cms), status updates, links, photos, videos (with comments and "likes" for each of these)
  • Upload photos and videos (didn't see it in the library)

The end goal is to have no apps needed to be added by the user on facebook. Creating a fully dynamic site will hopefully be as easy as clicking "Connect with Facebook" (later on I plan for the cms to sync up with twitter, youtube, etc aswell).

NOTE: I need the status updates, etc for a specific PAGE or GROUP owned by the user NOT the actual user.

+2  A: 

Although not very well documented, the facebook API allows for infinite session keys. Using an infinite session key will allow you to request data for each of your applications users (and find any deltas) which can then be stored for a period of no more than 1 day by a caching mechanism on your end. Theoretically this allows you to run a daily cronjob and cache the newly found data without breaking the Facebook API TOS.

I have used the above method for obtaining an infinite session key and it works as described, although I have noticed that it may expire under unknown circumstances. I believe if you do not periodically use the generated key (i.e. running a daily cronjob) it will eventually expire and need to be regenerated.

You can obtain access to a limited set of user data by requesting for extended permissions when a user initially "installs" your app. Some things you can obtain without the user actually being logged in include a user's gallery photos and their status updates. You would want user's to grant you the offline_access privilege to obtain such data.

cballou
Thanks that helped a lot. Any idea how to get status'/notes from a group that the user owns instead of the actual user?
Chris T