Retrieving public posts from multiple Facebook pages at the same time using the Graph API

半世苍凉 提交于 2020-01-15 07:08:32

问题


I know this will let the user retrieve the latest 10 posts from cocacola page.

https://graph.facebook.com/cocacola/posts/access_token=[####]&limit=10

Is there any way I can retrieve the latest 10 posts from cocacola and pepsi Facebook pages at the same time. Example:

https://graph.facebook.com/cocacola&pepsi/posts/access_token=[####]&limit=10

Can anyone help?

Thanks, Sami


回答1:


For the example you quoted, it's https://graph.facebook.com/posts?ids=cocacola,pepsi&access_token=[####]&limit=10

In the general case https://graph.facebook.com/?ids=<list of IDs>&fields=<list of fields> will work.

This is covered briefly on the main Graph API documentation under the heading 'selection'



来源:https://stackoverflow.com/questions/9845352/retrieving-public-posts-from-multiple-facebook-pages-at-the-same-time-using-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!