Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Requesting just geotagged statuses from the Twitter API

How can I ask the twitter API to give me just geotagged statuses? I'm currently filtering but it would make more sense to be more 'friendly'

like image 249
Bolster Avatar asked Oct 13 '22 20:10

Bolster


1 Answers

Seems like you should be able to do this with the streaming API and a location filter, just set the bounding box to cover the whole earth:

Just as with the track parameter, queries are subject to Track Limitations, described in Track Limiting and subject to access roles, described in the statuses/filter method. Both the number and size of bounding boxes is limited. Bounding boxes can be up to 360 degrees longitude by 180 degrees latitude, and you may specify up to 25 bounding boxes. A box of 360-degrees by 180-degrees will cover the whole earth. Higher access levels provide additional bounding boxes.

And since:

Only tweets that are both created using the Geotagging API and are placed from within a tracked bounding box will be included in the stream – the user’s location field is not used to filter tweets (e.g. if a user has their location set to “San Francisco”, but the tweet was not created using the Geotagging API and has no geo element, it will not be included in the stream).

You should then be getting essentially all geotagged statuses.

like image 195
Tim Lytle Avatar answered Oct 20 '22 10:10

Tim Lytle