如何使用 Twitter 搜索 API 返回与我的搜索查询匹配的所有推文,仅在最近五秒内发布? [英] How can I use the Twitter Search API to return all tweets that match my search query, posted only within the last five seconds?
问题描述
我想使用 API 返回与我的搜索查询匹配的所有推文,但仅返回最近五秒内发布的推文.
I would like to use the API to return all tweets that match my search query, but only tweets posted within the last five seconds.
借助 Twitter 的搜索 API,我可以使用 since_id 从特定 ID 中获取所有推文.但是,我真的看不出有什么好方法可以找到开始的推文 ID.
With Twitter's Search API, I can use the since_id to grab all tweets from a specific ID. However, I can't really see a good way to find the tweet ID to begin from.
我也知道您可以在实际查询中使用since:"来使用日期,但您不能输入时间.
I'm also aware that you can use "since:" in the actual query to use a date, but you cannot enter a time.
有 Twitter API 经验的人可以给我任何建议吗?感谢您的阅读和您的时间!
Can someone with Twitter API experience offer me any advice? Thanks for reading and your time!
http://apiwiki.twitter.com/Search-API-Documentation
推荐答案
这听起来像是您可以自行完成的事情,因为 created_at 是结果集中返回的字段之一.只需进行查询,并且仅使用最近 5 秒内的查询.
This sounds like something you can do on your end, as created_at is one of the fields returned in the result set. Just do your query, and only use the ones that are within the last 5 seconds.
这篇关于如何使用 Twitter 搜索 API 返回与我的搜索查询匹配的所有推文,仅在最近五秒内发布?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!