为什么错误的鸣叫ID是从Twitter的API返回的? [英] Why a wrong tweet id is returned from twitter API?

查看:141
本文介绍了为什么错误的鸣叫ID是从Twitter的API返回的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Twitter的API来获取用户家中的时间表鸣叫。我使用JSON响应格式。最近鸣叫ID(在API它仅仅是ID)的重新调整错误的。作为一个例子

I use twitter API to retrieve the user home timeline tweets. I use json response format. Recently the tweet id (in API it is just 'id') are retuned wrong. As an example

通常它应该返回这样的:标识:14057503720,(例如是从Twitter控制台)
然而,在我的要求它返回这样的:标识:1172601832

normally it should return like this: "id": 14057503720, (example is from twitter console) however at my request it is returned like this: "id": 1172601832

有1位少,这是完全不同的。我需要正确的ID,因为我不能使用像since_id或max_id参数。

It is 1 digit less and it is totally different. I need the proper ID because I can't make use of the parameters like since_id or max_id.

推荐答案

使用 ID_STR 而不是 ID 。它似乎并没有被记录,但如果你看看JSON的原始来源,你可以看到 ID_STR 每个鸣叫是正确的对应ID一的鸣叫。

Use id_str instead of id. It doesn't seem to be documented, but if you look at the raw source of the JSON you can see that id_str for each tweet is the one that correctly corresponds to the ID of the tweet.

这篇关于为什么错误的鸣叫ID是从Twitter的API返回的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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