Facebook 粉丝页面和相关开放图对象
如果存在这样的 facebook 粉丝页面:
https://www.facebook.com/HuffingtonPost
我想通过调用 graph API 来获得点赞数:
https://graph.facebook.com/https://www.facebook.com/HuffingtonPost
事实上,我得到:
{
"id": "https://www.facebook.com/HuffingtonPost",
"shares": 435839
}
另一方面,如果我调用,
https://graph.facebook.com/HuffingtonPost
我会得到更详细的输出:
{
"id": "18468761129",
"name": "The Huffington Post",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-ash2/188072_18468761129_6398033_s.jpg",
"link": "http://www.facebook.com/HuffingtonPost",
"likes": 435832,
"category": "Website",
"website": "http://www.facebook.com/HuffingtonPost",
"username": "HuffingtonPost",
"company_overview": "The Internet Newspaper\nNews | Blogs | Video | Community",
"description": "The Huffington Post - The Internet Newspaper. - Company Overview: The Internet Newspaper News | Blogs | Video | Community | Facebook",
[... omissis ...]
}
谁能告诉我这两个 opengraph 对象之间有什么区别?
分享数和点赞数之间也存在细微差别。为什么?
更新:
在过去的几天里,图表 API 也返回了对象类型,所以我意识到:
- 第一个 API 调用返回一个 link_stat 类型对象。
- 第二个 API 调用返回页面类型对象。
在第一种情况下,分享计数应代表以下各项的总和:
- 此 URL 的点赞数
- 此 URL 的分享数(这包括将链接复制/粘贴回 Facebook)
- Facebook 上有关此 URL 的故事的点赞数和评论数
- 收件箱消息数包含此 URL 作为附件。
在第二种情况下,像计数只代表它自己
有人可以确认我分享计数的正确性吗?
If exist a facebook fan page like this:
https://www.facebook.com/HuffingtonPost
I suppose to get likes count calling graph API:
https://graph.facebook.com/https://www.facebook.com/HuffingtonPost
Infact here I get:
{
"id": "https://www.facebook.com/HuffingtonPost",
"shares": 435839
}
On the other hand if I call
https://graph.facebook.com/HuffingtonPost
I get a more verbose output:
{
"id": "18468761129",
"name": "The Huffington Post",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-ash2/188072_18468761129_6398033_s.jpg",
"link": "http://www.facebook.com/HuffingtonPost",
"likes": 435832,
"category": "Website",
"website": "http://www.facebook.com/HuffingtonPost",
"username": "HuffingtonPost",
"company_overview": "The Internet Newspaper\nNews | Blogs | Video | Community",
"description": "The Huffington Post - The Internet Newspaper. - Company Overview: The Internet Newspaper News | Blogs | Video | Community | Facebook",
[... omissis ...]
}
Can anybody tell me what's difference between these two opengraph objects?
There is also a slight difference between number of shares and likes. Why?
Update:
During last days graph api returned also object type, so I realized that:
- First API call returns an link_stat type object.
- Second API call returns a page type object.
In first case shares count should represent sum of:
- number of likes of this URL
- number of shares of this URL (this includes copy/pasting a link back to Facebook)
- number of likes and comments on stories on Facebook about this URL
- number of inbox messages containing this URL as an attachment.
In second case like count represents only itself
May somebody confirm me shares count correctness?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于喜欢、分享和评论之间的细分(它们被添加并用作喜欢按钮上的“喜欢”数字,您最好使用 FQL。
如果您使用 OG,类似于 http://graph.facebook.com/http://example.com 将向您展示:
... 信息。
如果您使用 FQL,您可以得到每个的详细 在屏幕上显示如下内容:
另外,SA 现在有一个 Facebook 特定网站,可能对您有帮助:) facebook.stackoverflow.com。
For the breakdown between likes, shares and comments (which are added up and used as the "likes" number on the likes button, you're better off using FQL.
If you use OG, something like http://graph.facebook.com/http://example.com will show you:
... as you've noted above. If you use FQL, you can get the breakdown of each.
This will display something on-screen like:
Also, SA now has a Facebook-specific site that may be helpful to you. :) facebook.stackoverflow.com
第一个是告诉您所选网址有多少个赞。
使用第二个,您将通过页面标识符获取有关页面对象的信息
First one is something that tells you how many likes selected url have.
Using second one you will get information about Page Object through page identifier