Twitter - 用于全球推文监控的流 API?
我希望创建一个类似于以下的 Twitter 地图可视化:
http://beta.twittervision.com/
但是,根据 Streaming API 文档:
https://twitterapi.pbworks.com/Streaming-API-Documentation#locations
Twitter 仅允许流 API 访问区域边界框的每边长度仅等于 1 度经度/纬度。
尽管 Twitter 有限制,这些网站如何执行这些查询?我有什么遗漏的吗?
I'm looking to create a Twitter map visualization much like these:
http://beta.twittervision.com/
However, according to the Streaming API docs:
https://twitterapi.pbworks.com/Streaming-API-Documentation#locations
Twitter only permits streaming API access of an area's bounding box with each side's length equal to only one degree of lon/lat.
How are these sites executing these queries despite Twitter's limitations? Is there something I'm missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
他们很可能使用
statuses/sample
网址,因为它只是为他们提供随机推文。只要帖子包含位置数据,他们就可以使用它。只要发送的推文带有纬度/经度数据,他们就能够将它们绘制在地图上。
They are most likely using the
statuses/sample
url, as it just gives them random tweets. As long as the post comes through with location data, they can use it.As long as the tweets that are being sent come with Lat/Long data, they would be able to plot them on the map.
请注意,您可以在流式 API 上申请提升访问级别。提升级别可为您提供更多可供使用的边界框,并允许您在查询字符串中指定更多边界框。
看看您提到的两个应用程序,它们绝对没有显示地理定位推文的完整流。他们可能会组合样本或过滤器流,并且仅获取地理标记的推文,或基于位置字段进行地理查找,或两者的组合。
Note that you can apply for elevated access levels on the streaming API. Elevated level give you more bounding boxes to work with, and allow you to specify more bounding boxes in the query string.
Looking at the two applications you mentioned, they are definitely not displaying the full stream of geolocated tweets. They may be combining the sample or filter stream and either taking only geotagged tweets, or doing geo lookup based on the location field, or a combination of the two.