The Facebook Graph API lets you grab a JSON representation of home (News Feed) & feed (Wall).
How do I just get the posts made by my Facebook app?
You can now run Facebook Query Language (FQL) queries using the Facebook Graph API (base URL: https://graph.facebook.com
).
Let's say your application is Twitter. Twitter's Facebook application ID is 2231777543.
I came up with the FQL queries below with the help of @danontheline's answer and by carefully reading Facebook's documentation on FQL stream & FQL stream_filter.
The following excerpt is particularly pertinent:
If you specify a
filter_key
from thestream_filter
FQL table or multiple users, results returned will behave like the user's homepage news feed. If only one user is specified as the source_id, you will receive the profile view of the user or page. You can filter these profile view posts by specifyingfilter_key
'others' (return only posts that are by someone other than the specified user) or 'owner' (return only posts made by the specified user). The profile view, unlike the homepage view, returns older data from our databases. In the case of a Page, the profile view also includes posts by fans.
GET /fql?q=SELECT post_id, actor_id, message, app_id, attribution FROM stream WHERE filter_key = 'app_2231777543'
GET /fql?q=SELECT post_id, actor_id, message, app_id, attribution FROM stream WHERE source_id = me() AND app_id = '2231777543' LIMIT 1000
Running these queries with the Facebook Graph API Explorer returns Facebook Graph API post objects (The result set will differ depending on access_token
, privacy, etc.). You can find out more about each post by adding other columns of the stream table to the queries above and/or by simply making another Graph API request to GET /{post_id}
for eache post_id
returned by the FQL stream queries above.