Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

find tweet location

Tags:

twitter

I'm using the Twitter search api to search for a keyword so I can grab all the tweets containing that keyword. I also need to find the location of these tweets. Is this possible? I've looked through the JSON and the 'Geo' property is always null - i'd be happy to just use the location that the user has filled out in their profile but I can't see that this is available through the search api.

I've seen lots of apps that allow you to find tweets nearby based on your location but I want to do something different. find tweets by keyword and then find their location.

Is this possible?

like image 506
Mike Rifgin Avatar asked Aug 12 '10 19:08

Mike Rifgin


1 Answers

Apologies, just found a solution.

The REST api allows me to query based on a search string:

http://search.twitter.com/search.json?&q=twitter

and this returns some json including the user id and then from there I can query again using this:

http://api.twitter.com/1/users/show.xml?user_id=1401881

which returns me user info including a location.

like image 199
Mike Rifgin Avatar answered Sep 19 '22 19:09

Mike Rifgin