[英]Facebook Graph API - updated_time is incorrect for a single post
I've built a timeline app, using the graph API to query the posts on a specific facebook page. 我建立了一个时间轴应用程序,使用图形API查询特定Facebook页面上的帖子。 I use the updated_time of the post to arrange it in order on the timeline.
我使用帖子的updated_time在时间轴上按顺序排列它。
I got a bug report filed today, because a single post keeps moving to the front of the timeline. 我今天收到了一个错误报告,因为一个帖子一直在时间轴的最前面。
It looks like whenever someone comments on this post, the updated_time is changed. 看起来只要有人对此帖子发表评论,updated_time就会更改。 Weirdly, this only seems to be the case for this one wall post.
古怪,这只是似乎是这一个的墙后的情况。 All of the others have their created_time the same as the updated_time as I'd expect.
正如我所期望的那样,所有其他人的created_time与updated_time相同。 Posted comments on these posts will not "bounce" them to the front of the timeline.
在这些帖子上发表的评论不会将它们“弹跳”到时间线的前面。
I call the graph API like this: https://graph.facebook.com/somepagename/posts?method=GET&metadata=true&format=json&access_token=XXXXXXX 我这样称呼图形API: https : //graph.facebook.com/somepagename/posts?method=GET&metadata=true&format=json&access_token=XXXXXXX
In the JSON, I get some post items looking like this: 在JSON中,我得到了一些如下所示的帖子:
{
...
"created_time": "2011-10-05T11:47:20+0000",
"updated_time": "2011-10-05T11:47:20+0000",
...
},
{
...
"created_time": "2011-10-05T08:12:27+0000",
"updated_time": "2011-10-05T11:57:35+0000", <--- PROBLEM!
...
},
{
...
"created_time": "2011-10-04T12:52:39+0000",
"updated_time": "2011-10-04T12:52:39+0000",
...
},
Is this a bug in the Graph API, or is there something else going on that I don't understand? 这是Graph API中的错误,还是发生了我不理解的其他事情? Is the updated_time calculation different for different types of wall posts (gallery updates, video posts, text, etc)?
不同类型的墙贴(图库更新,视频贴,文字等)的updated_time计算是否不同?
The correct behavior is for updated_time to change each time a comment is added to a post. 正确的行为是,每次将评论添加到帖子时,updated_time都会更改。
However, there is currently a bug in which updated_time gets reset to the value of created_time when the post gets a certain number of comments (seems to be around 30). 但是,当前存在一个错误,即当帖子收到一定数量的评论(似乎大约为30)时,updated_time会重置为created_time的值。 In your case, it sounds like the other posts probably already have a large number of comments.
就您而言,听起来其他帖子可能已经有很多评论。
This bug has been around for a long time but I'm optimistic that we'll finally see a resolution in the near future thanks to "Operation Developer Love". 这个错误已经存在了很长时间,但是我很乐观,由于“ Operation Developer Love”,我们将在不久的将来看到一个解决方案。 You can view the bug report and subscribe to updates here: http://developers.facebook.com/bugs/274107099276048
您可以在此处查看错误报告并订阅更新: http : //developers.facebook.com/bugs/274107099276048
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.