我的 Twitter 流边界框出了什么问题?
有了这个网址,我应该会看到伦敦周围的推文,对吗?
http://stream.twitter.com/ 1/statuses/filter.json?locations=51.23,-0.28,51.68,0.25
但没有任何反应:(
我尝试了不同的区域,但我不能什么也没得到,虽然我正在尝试文档中给出的区域,但也不使用 cURL / POST
当我添加关键字跟踪参数时,我收到了大量的推文 - 但这并不意味着位置有效(位置边界框)是与其他过滤参数的逻辑或)
。 href="http://stream.twitter.com/1/statuses/filter.json?track=royalwedding&locations=51.23,-0.28,51.68,0.25" rel="nofollow">http://stream.twitter.com/1/statuses/filter.json?track=royalwedding&locations=51.23,-0.28,51.68,0.25
谢谢!
Given this url, I should see tweets around London, right?
http://stream.twitter.com/1/statuses/filter.json?locations=51.23,-0.28,51.68,0.25
But nothing happens :(
I tried different areas but I couldn't get nothing at all, although I'm trying areas given in the doc, neither using cURL / POST.
When I add a keyword track parameter, I get ton of tweets -- but it doesn't mean that location works (location bounding boxes are logical ORs w/ other filtering params).
http://stream.twitter.com/1/statuses/filter.json?track=royalwedding&locations=51.23,-0.28,51.68,0.25
Thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我使用 Streaming API 的经验,我发现带有地理标记的推文数量少得惊人。而且,您的位置可能过于严格。但是,当您添加关键字参数时,正如您所说,您将获得两个搜索的“或”结果 - Twitter 这样做是为了让您可以在同一连接上执行多个流式查询。
如果你尝试
你会得到各种各样的回应。
编辑:哎呀,还有,你的经度和纬度向后。经度在他们的 API 中排在第一位。这个网址有效:
In my experience with the Streaming API, I have found that there's a surprisingly small amount of geotagged tweets. And, it's possible your locations are too restrictive. But when you add the keyword parameter, as you state, you're getting OR'd results back for both searches -- Twitter does this so you can perform multiple streaming queries on the same connection.
If you try
You get all sorts of responses back.
EDIT: oops, also, you have your longitude and latitude backwards. longitude comes first in their API. This URL works: