4

I've searched around, but can't find the answer, so I try here.

Is it possible to get posts by others on a page wall (See image as example: http://d.pr/i/fklT) via. Facebook's API?

I've tried with /PAGE_ID/posts, but that only gives me updates created by the page and not by the people that liked the page

Simon Thomsen
  • 1,351
  • 7
  • 27
  • 37

3 Answers3

3

As Martin said, it's possible with the Graph API using FQL. I tried Martin's solution, but needed to change it a little bit.

Defining filter_key = 'others' didn't help. Instead, you can replace it for actor_id != YOUR_PAGE_ID, so, in the end, you can have:

https://graph.facebook.com/fql?q=SELECT post_id, created_time , app_data, type, actor_id, target_id, message FROM stream WHERE  source_id = YOUR_PAGE_ID AND actor_id != YOUR_PAGE_ID&access_token=YOUR_ACCESS_TOKEN

If you need more variables, you just need to put them after SELECT, and you can check them out here: https://developers.facebook.com/docs/reference/fql/stream

On iOS, you don't need to put the access token in the query. To check how to do it with the latest iOS SDK, see my answer here: https://stackoverflow.com/a/14357179/675486

Community
  • 1
  • 1
Natan R.
  • 5,141
  • 1
  • 31
  • 48
1

This is possible by using FQL instead of the normal graph objects:

https://graph.facebook.com/fql?q=SELECT post_id, actor_id, target_id, message FROM stream WHERE filter_key = 'others' AND source_id = YOUR_PAGE_ID&access_token=YOUR_ACCESS_TOKEN

More about FQL: https://developers.facebook.com/docs/reference/fql/

Martin Müller
  • 2,565
  • 21
  • 32
1

Using graph api, you can get all posts (including those by others) querying the field "feed" instead of "posts", eg /PAGE_ID/feed. I got this from this other answer:

https://stackoverflow.com/a/14401026/1449045

Community
  • 1
  • 1
ggll
  • 963
  • 10
  • 13