Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter streaming API - trying to get results based on location/bounding box

I am playing around with the Twitter Streaming API and have got my head around it at a basic level, but I can't seem to get reliable results for the location - I'm using a bounding box as specificed in the docs, the location I want to track is Glasgow but I am getting results from all over the world.

My bounding box is $locations = '55.67,-4.66,56.17,-3.892540'; Does anyone know how to get the correct bounding box? If these are correct, then is there another explanation for what might be happening? Thanks!

like image 911
user1153594 Avatar asked Feb 01 '26 15:02

user1153594


1 Answers

You have it in latlon, twitter wants it lonlat. IOW, try '-4.66,55.67,-3.98,56.17'. BTW, IME, you'll still get tweets outside of the bounding box but hopefully not from "all over the world". :-)

like image 54
faberfedor Avatar answered Feb 03 '26 11:02

faberfedor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!