Geocode Search

158 views
Skip to first unread message

Gianni Cristian Iannelli

unread,
Jan 28, 2014, 9:26:57 AM1/28/14
to twe...@googlegroups.com
Hi all,

I would like to search for geotag tweets! I wrote this code but doesn't seems to work:

import tweepy

ckey = 'code'
csecret = 'code'
atoken = 'code'
asecret = 'code'

auth = tweepy.OAuthHandler(ckey, csecret)
auth.set_access_token(atoken, asecret)

api = tweepy.API(auth)

locations=[-77.03556429999999, 38.896661, -77.0375643, 38.898661]

results = api.search(locations)

for result in results:
    print result.text

I don't get any results! Is this working?

Thanks!!

 

aa1r...@gmail.com

unread,
Feb 24, 2014, 7:10:10 AM2/24/14
to twe...@googlegroups.com
For the search SPI, you need to specify a coordinate pair and a radius through the 'geocode' parameter. In addition, the 'q' parameter is required.

See the docs for more info: https://dev.twitter.com/docs/api/1.1/get/search/tweets

Reply all
Reply to author
Forward
0 new messages