如何查询 Facebook 主页共享的链接?
我可以使用图表 /me/likes 获取用户的页面/喜欢列表。但是我怎样才能返回这些页面共享的链接列表呢?
例如,假设用户喜欢 Facebook 平台页面。我可以使用 /me/likes 提取此 ID (19292868552
)图形 API。但是我如何提取 Facebook 平台页面在其页面上共享的链接呢?
对于普通用户,您可以执行以下操作:
示例 FQL:
SELECT link_id, title, summary, url FROM link WHERE owner IN (19292868552);
但对于 Facebook 页面(如上面的 Facebook 平台页面示例),这会返回 null。但实际的 Facebook 平台页面 显示了数十个链接(至少)。如何获取这些页面共享的链接?
您可以在这里测试: FQL 查询测试控制台
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我来晚了一点,但我想我应该在这里发布我的要点示例。 fbconsole 使通过 Facebook Graph API 提取数据变得相当简单,以解决此问题。
需要注意的是,通过 fbconsole 以编程方式提取数据并不是非常容易,因此我编写了
fbconsole.automatically_authenticate
,以便更轻松地以系统方式访问此信息。此添加尚未合并到 fbconsole 的 master 分支(今天早上刚刚发布),但是感兴趣的人可以在此处获取它。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.