最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Get posts by other on page wall (Facebook API) - Stack Overflow

programmeradmin1浏览0评论

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: ) 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

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

Share Improve this question edited Dec 14, 2012 at 15:15 Simon Thomsen asked Dec 14, 2012 at 14:12 Simon ThomsenSimon Thomsen 1,4217 gold badges28 silver badges37 bronze badges 2
  • Have you tried to take a look at Facebook API? – Alvaro Commented Dec 14, 2012 at 14:15
  • Yes. /PAGE_ID/posts is the only thing I can find (only gives me the pages updates) – Simon Thomsen Commented Dec 14, 2012 at 15:14
Add a ment  | 

3 Answers 3

Reset to default 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./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./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./a/14357179/675486

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

https://graph.facebook./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./docs/reference/fql/

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./a/14401026/1449045

发布评论

评论列表(0)

  1. 暂无评论