Here is some thoughts that maybe will steer you in the right direction (I haven't tried this myself).
You can get wall posts by running FQL on stream
table. Getting all wall posts by user id (source_id
) seems straight forward, but getting all wall posts made from an app might require some extra work. Doc says:
If you want to return all the posts from a user's stream that were published through your application, make sure you include the app_id in your query.
Not sure if query will work if you do a search directly by app_id
field as it is not indexed (but worth trying). If not, then looks like you need to do a search by filter_key
. Now docs don't really explain what exactly that field means (surprise), but on their stream.get
page from Old REST API it says:
You can determine the filters using stream.getFilters or querying the stream_filter FQL table. Filters can be user-defined, Facebook-defined (like News Feed/nf or networks), or for applications (app_<APPLICATION ID>
).
Looks like app_<APPLICATION ID>
filter is what we need for filter_key
field (if that still works). If not then play with stream_filter
table and see what kind of filters it contains and if there any sort of app filter available. I suspect your FQL might look something like:
SELECT message FROM stream WHERE filter_key = "application" AND app_id = 123456789