0

为什么这两个查询返回不同的类似计数?

1) fql?q... 查询返回 0 个赞

https://graph.facebook.com/fql?q=SELECT+url%2C+normalized_url%2C+share_count%2C+like_count%2C+comment_count%2C+total_count%2C+commentsbox_count%2C+comments_fbid%2C+click_count+FROM+link_stat+WHERE+url%3D%27http%3A%2F%2Fwww.facebook.com%2Fpages%2FLine-And-Circle%2F49561759728%27

返回:

{
  "data": [
    {
       "url": "http://www.facebook.com/pages/Line-And-Circle/49561759728",
       "normalized_url": "http://www.facebook.com/pages/Line-And-Circle/49561759728",
       "share_count": 0,
       "like_count": 0,
       "comment_count": 0,
       "total_count": 0,
       "commentsbox_count": 0,
       "comments_fbid": null,
       "click_count": 0
    }
 ]
}

2)直接对象查询返回436个赞

https://graph.facebook.com/49561759728

返回:

{
    "name": "Line & Circle",
    "is_published": true,
    "website": "http://lineandcirclemusic.tumblr.com/",
    "description": "follow \u0040LineAndCircle",
    "about": "Echo Park, Los Angeles via the Midwest, USA. http://lineandcirclemusic.tumblr.com/",
    "genre": "Indie/Alternative",
    "hometown": "Los Angeles, California",
    "current_location": "Los Angeles, California",
    "record_label": "White Iris",
    "press_contact": "lineandcirclemusic\u0040gmail.com",
    "influences": "Richard Neutra, Erik Satie, Lord Byron, Richard Yates, Grace Kelly, Phil Hartman, Bobby Briggs, Denard Robinson, etc.",
    "band_interests": "Ice cream, ice fishing, etc.",
    "category": "Musician/band",
    "id": "49561759728",
    "link": "https://www.facebook.com/pages/Line-Circle/49561759728",
    "likes": 436,
    "cover": {
       "cover_id": "10151094140979729",
       "source": "http://sphotos-a.xx.fbcdn.net/hphotos-ash4/s720x720/391388_10151094140979729_1992918206_n.jpg",
       "offset_y": 31
    }
}

在其他情况下,例如对于用户名“newfoundglory”,fql 查询返回接近点赞数的内容,但仍与直接查询不同。

为什么这两个查询返回不同的结果?

4

2 回答 2

0

正如预期的那样,第一个图形调用返回 0 个赞,因为该表用于跟踪外部 url 的赞和评论,而不是 facebook 上的内部页面。
要获取该数据,您应该使用页表并查询 fan_count -

select page_id, name, page_url, fan_count from page where name = 'Line & Circle'

这将返回预期的结果 -

"data": [
{
  "page_id": 49561759728, 
  "name": "Line & Circle", 
  "page_url": "https://www.facebook.com/pages/Line-Circle/49561759728", 
  "fan_count": 436
}
]
于 2012-11-20T20:07:13.210 回答
0

graph.facebook.com/49561759728?fields=likes

{“喜欢”:637,“id”:“49561759728”}

我使用此链接生成https://developers.facebook.com/tools/explorer/?method=GET&path=agenciadac%3Ffields%3Dlikes

于 2013-11-21T01:22:41.000 回答