如何使用 Facebook Graph API 获取热门页面?
我刚刚实现了新的 Facebook 评论插件。如何轻松获取网站上评论最多的最受欢迎页面的列表?我不想使用 Graph API 单独查询每个页面并查找每个页面的评论计数。
I just implemented the new Facebook comments plugin. How can I easily get a list of the most popular pages on my site that have the most comments? I don't want to have to use the Graph API and query each page individually and look up the comment count for each page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
寻找图表见解或见解 fql 表。文档位于 Facebook 开发者页面上。
[编辑]
抱歉,我完全误解了你的问题。
我怀疑您的问题是否有解决方案。据我所知,Facebook 错过了在 api 中添加一个方法来声明某个域的首页,即使他们在博客文章中表示他们将扩展图形 api ( http://developers.facebook.com/blog/post/476/ )
目前,您可以使用图表 api 做的就是获取特定 url 的统计信息。要获取“前 10 个”列表,您需要使用所有 url 抓取 api,这是不切实际的。
如果您只是想了解(而不是在页面上显示)当前的“热门”列表,请查看您的 Facebook 见解 ( http://www.facebook.com/insights ) - 选择您的域名,“评论框” - 然后应该有一个“热门页面”子菜单。 “喜欢”和“发送”也是如此。
Look for graph insights or insights fql table. documentation is on facebook developer pages.
[edit]
Sorry, I misunderstood your question completely.
I doubt there is a solution available to your question. As far as I can see Facebook missed to add a method into the api to claim the top pages for a domain, even when they said in a blog post they will extend graph api ( http://developers.facebook.com/blog/post/476/ )
All you can (currently) do with the graph api is to get stats for a specific url. To get a list of "top 10" you'ld need to crawl the api with all your urls, which is not practical.
If you just like to know (and not display on your page) the current "top" lists, then look into your facebook insights ( http://www.facebook.com/insights ) - select your domain, "Comment Box" - then there should be a "Popular pages" submenu. Same for "Likes" and "Sends".
文档中存在一个“错误”,表明目前无法通过 FQL 或 Graph API 找出您域中最受欢迎的 URL。我不相信情况是这样,因为 FB 声称 API 比仪表板更强大。
我已向 FB 提交了此错误报告:https://developers.facebook.com/bugs/192027544209678
一旦我自己破解它或 FB 更新了他们的文档,我就会更新这个答案。这绝对是社区中一个紧迫的问题。
There is a "bug" in the documentation that suggests it is not currently possible to find out what the top liked URLs in your domain are via FQL or the Graph API. I don't believe this is the case, as FB claims that the API is more robust than the dashboard.
I have filed this bug report with FB: https://developers.facebook.com/bugs/192027544209678
I will update this answer once I either hack it on my own or FB updates their documentation. This is definitely a burning question in the community.