Reputation: 2438
I'm using the python-twitter API
and whatever I pass to the below code as user
, still returns my timeline and not the required user's. Is there something I'm doing wrong?
import twitter
api = twitter.Api(consumer_key=CONSUMER_KEY,
consumer_secret=CONSUMER_SECRET,
access_token_key=ACCESS_KEY,
access_token_secret=ACCESS_SECRET)
user = "@stackfeed"
statuses = api.GetUserTimeline(user)
print [s.text for s in statuses]
When I do not pass the required fields into twitter.Api, it gives me an authentication error.
Upvotes: 3
Views: 188
Reputation: 473763
You should use screen_name
keyword argument, e.g.:
statuses = api.GetUserTimeline(screen_name="@gvanrossum")
Upvotes: 4