错误的“像计数”在Facebook相册流 [英] Wrong "Like count" in Facebook Album Stream

查看:122
本文介绍了错误的“像计数”在Facebook相册流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Facebook时间轴phtot流,以显示网站上的最新照片。
我们正在解析网址: http://graph.facebook.com/132827113407662/photos



如果你看第5张图片,它显示25喜欢。
如果您在fb( https://www.facebook.com/photo.php?fbid=635486689808366&set=a.132827113407662.19448.114902408533466&type=1 ),它显示31喜欢。



如何获取正确数量的喜欢。
似乎流中最大的数字( http://graph.facebook.com/ 132827113407662 / photos )ist 25.任何类似高于25的都将被忽略。



为什么?

解决方案

喜欢收藏被分页。您可以阅读有关分页的更多信息 here
看起来似乎仍然没有办法使用图形api请求来获取所有行的数据。
但您可以通过 FQL 获取。

  select like_info,object_id from photo where album_object_id = 132827113407662 

返回:

  {
data:[
...
{
like_info:{
can_like:true,
like_count:31,
user_likes:false
},
object_id:635486689808366
},
...
]
}
pre>

we are using the facebook timeline phtot stream, to show the last photos on the website. We are parsing the url: http://graph.facebook.com/132827113407662/photos

If you have a look at the 5th pic, it shows 25 likes. If you look at this pic on fb (https://www.facebook.com/photo.php?fbid=635486689808366&set=a.132827113407662.19448.114902408533466&type=1), it shows 31 "Likes".

How can I get the correct number of "likes". It seems, that the largest number in the stream (http://graph.facebook.com/132827113407662/photos) ist 25. Any like higher than 25 will be ignored in the stream.

Why?

解决方案

Likes collection is paginated. You can read more about pagination here. Looks like there is still no way to get all rows count for a collection using graph api request. But you can get it through FQL.

select like_info, object_id from photo where album_object_id = 132827113407662

Returns:

{
  "data": [  
     ...      
     {
       "like_info": {
         "can_like": true, 
         "like_count": 31, 
         "user_likes": false
       }, 
      "object_id": 635486689808366
     }, 
     ...
  ]
}

这篇关于错误的“像计数”在Facebook相册流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆