需要一个 Twitter API,可以根据给定的坐标获取特定位置的推文
我正在尝试找到一个基于 Java 的 API,可以与 Twitter 的 Restful Web 服务一起使用,这样我就可以获取给定位置和日期的推文。但我更关心给定地理位置(纬度和经度)的搜索)
我已经在使用 Twitter 的官方 API,它可以满足我的需要,只是它不会为我提供任何超过 1 周的推文。
有谁知道有什么 API 可以帮助我吗?
谢谢
I am trying to find a Java-based API that can be used with Restful webservices for Twitter that would allow me to get tweets given their location, and their dates..but I am more concerned with searching given their geographical location (latitude and longitude)
I've already been using Twitter's official API, which does what I need except that it doesn't get me any tweets older than 1 week.
Does anyone know any API which could help me ?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
恐怕你实际上无法获取超过一周的推文。根据官方 API 规范,您可以检索的结果包含最多 6- 9天了。请记住,搜索 API 并不是所有推文的完整索引,而是最近推文的索引。
我还假设您已经知道如何使用 API 获取给定位置的推文,因此我不会向您解释。
我可以建议的是 阅读本文,其中指向 Snap Bird 和 Topsy。我认为他们没有你可以使用的 API,而且他们不进行地理搜索,所以我担心你将无法实现你的目标。
I'm afraid you actually can't get tweets older than one week. According to the official API specification the results you can retrieve entail tweets that are up to 6-9 days old. Please keep in mind that the Search API is not a complete index of all Tweets, but instead an index of recent Tweets.
I also assume that you already know how to use the API to get tweets for a given location so I won't explain you that.
What I can suggest though is reading this article which points at websites like Snap Bird and Topsy. I don't think they have an API that you can use though and they don't do geo-search, so I'm afraid you won't be able to achieve your goal.
对此可能的解决方案之一是对 Twitter API 调用返回的结果进行本地存档,并将推文保存在数据库中,以便将来它们可以作为旧推文使用,但这只会提供存档时的旧推文将开始
One of the possible solutions for this is to do local archiving of the results returned from the twitter API calls and save the tweets in database so they will be available in future as old tweets but this will only provide old tweets from the time when the archive will start