How do I query links shared by Facebook Pages?

蹲街弑〆低调 提交于 2019-12-25 04:06:41

问题


I can get a user's page/likes list using the graph /me/likes. But how can I return a list of links shared by these Pages?

For example, let's say a user likes the Facebook Platform Page. I can pull this id (19292868552) using the /me/likes graph api. But how can I pull the links that the Facebook Platform Page has shared on their page?

For a regular user you would do something like this:

Sample FQL:

SELECT link_id, title, summary, url FROM link WHERE owner IN (19292868552);

But for Facebook Pages (like the above Facebook Platform Page example), this returns null. But the actual Facebook Platform Page shows dozens of links (at least). How can I get the links shared by these pages?

You can test it here: FQL Query Test Console


回答1:


I'm a little late to the party here, but I thought I'd post my gist example here. fbconsole makes it fairly simple to extract data through the Facebook Graph API to address this issue.

The caveat is that it was not terribly easy to programmatically extract data through fbconsole so I wrote the fbconsole.automatically_authenticate to make it much easier to access this information in a systematic way. This addition has not yet been incorporated into the master branch of fbconsole (it was just posted this morning), but it is available here in the meantime for those that are interested.



来源:https://stackoverflow.com/questions/7421943/how-do-i-query-links-shared-by-facebook-pages

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