开发者

What's wrong with my Twitter stream bounding boxes?

开发者 https://www.devze.com 2023-03-01 09:01 出处:网络
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

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=royalwedd开发者_运维知识库ing&locations=51.23,-0.28,51.68,0.25

Thanks !


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

http://stream.twitter.com/1/statuses/filter.json\?locations\=-180,-90,180,90

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:

 http://stream.twitter.com/1/statuses/filter.json\?locations\=-0.28,51.23,0.25,51.68
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号