Roy Zhang
Roy Zhang

Reputation: 61

Python-Twitter API GetLocation

I am trying to get the location information from Twitter profiles using the python-twitter API (http://code.google.com/p/python-twitter/). The documentation (http://static.unto.net/python-twitter/0.5/doc/twitter.html) states that there is a GetLocation call, but I can't seem to get it to work.

Upvotes: 0

Views: 1513

Answers (2)

chris
chris

Reputation: 63

With the Twython Library you can get the location information for a user with a specific user name as follows:

from twython import Twython
twitter = Twython(APP_KEY, APP_SECRET,OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
print twitter.show_user(screen_name=USER_NAME)["location"]

It should be similar for other libraries.

I hope this helps.

Upvotes: 2

nucleartide
nucleartide

Reputation: 3988

python-twitter is up to version 1.9, you're using ancient documentation! Since python-twitter is an exact mapping to the Twitter API, see the Twitter docs if you want to get location info.

Upvotes: 0

Related Questions