1

Facebook 正在弃用“page_like_adds”和“page_comments_adds”。它们有助于了解在页面内容上发布了多少喜欢和/或评论。

现在,使用新的“page_stories_by_story_type”,充其量,您可以获得由您的内容生成的“故事”数量(包括喜欢、评论和分享),但您没有每个故事的数字。

您知道在页面上获得喜欢和评论计数的任何其他方式吗?

谢谢

4

2 回答 2

0

好的,我可能有这个错误,但我认为您只需要通过图形 API 获取图形中的对象。

例如

https://graph.facebook.com/cocacola

{
"id": "40796308305",
"name": "Coca-Cola",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/276879_40796308305_1578420141_s.jpg",
"link": "http://www.facebook.com/coca-cola",
"likes": 36470992,
"category": "Food/beverages",
"website": "http://www.coca-cola.com",
"username": "coca-cola",
"founded": "1886",
"description": "On May 8, 2011, Coca-Cola marks its 125th anniversary. Created in 1886 in Atlanta, Georgia, by Dr. John S. Pemberton, Coca-Cola was first offered as a fountain beverage at Jacob's Pharmacy by mixing Coca-Cola syrup with carbonated water. \n\nCoca-Cola was patented in 1887, registered as a trademark in 1893 and by 1895 it was being sold in every state and territory in the United States. In 1899, The Coca-Cola Company began franchised bottling operations in the United States. \n\nCoca-Cola might owe its origins to the United States, but its popularity has made it truly universal. Today, you can find Coca-Cola in virtually every part of the world.",
"can_post": true,
"checkins": 77,
"talking_about_count": 193996
}

注意到“喜欢”、“签到”和“talink_about_count”了吗?页面对象的这些属性没有给你你想要的吗?如果您想要页面上单个帖子的“赞”和其他属性,您可以选择使用 FQL 或转到“帖子”连接并查看每个帖子的赞/评论。然而,后者可能需要很长时间来处理,但我不知道该项目的更广泛范围或其目标,所以这一切都很笼统。

于 2011-12-22T00:43:26.883 回答
0
#this might help you

import facebook
token='add token here'
graph = facebook.GraphAPI(token)
#to get the page data
page = graph.get_object('6127898346')
#to get the post of the page add the post id 
page_post=graph.get_object('10155272237029571')
print(page_post)
于 2017-06-14T06:50:41.147 回答