Twitter APIsince_id 仍然返回每个结果
我正在尝试将“since_id”参数用于 Twitter 的搜索 API,但运气不佳...大约一年前,我在网站的先前版本上使用了它,它似乎运行良好,但现在,而不是返回所有内容自从我检索了上一轮推文以来,它没有返回任何内容。
无论我获取什么搜索词的 JSON 数据,我都会收到警告:
“警告”:“已将since_id调整为69477074326401025(),请求的since_id早于允许的值-since_id已删除以进行分页。”
我本以为如果我搜索的内容超过一天左右,我就会得到这个,但我正在查看的一些提要的最后更新时间为 10 秒..!
有谁知道为什么会发生这种情况,或者您是否可以第一次传递一个额外的参数以使其工作?
目前正在我的开发网站上尝试这个,但如果我能让它工作,它将被推送到的实时版本是 www.twitgeek.net
谢谢伙计们
I'm trying to utilise the 'since_id' parameter for Twitter's search API and not having much luck...I used it around a year ago on a previous version of my site and it seemed to work well but now, instead of returning all tweets since I retrieved the previous round of tweets, it's not returning anything.
No matter what search term I get JSON data for, I also get a warning:
"warning":"adjusted since_id to 69477074326401025 (), requested since_id was older than allowed -- since_id removed for pagination."
I would have thought if I searched for something that was older than a day or so I'd get this, but some feeds I'm pulling through have a last updated time of 10 seconds..!
Does anyone know why this happens or whether you can pass an extra parameter the first time to make it work?
Trying this on my dev site at the moment but the live version it will be pushed to if I can get it to work is www.twitgeek.net
Thanks dudes
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于某种原因,无论我进行什么搜索,无论提要更新的频率如何,对象的“since_id”部分总是以“太旧”的形式返回并重新生成。
'max_id' 是最适合此目的的。我的新代码使用since_id进行了调用,但将max_id作为参数传递给URL,如下所示:
使用它似乎很神奇!
For some reason, the 'since_id' part of the object was always returned as "too old" and re-generated, no matter what search I made, no matter how often the feed was updated.
'max_id' is the one that works properly for this purpose. My new code made a call using since_id but passing in the max_id as the parameter to the URL like this:
Using this instead seems to work like a charm!