Yomo710
Yomo710

Reputation: 125

How to get user_id from tweet_id in Tweepy?

I'm having trouble getting the user_id from a specific tweet_id. Is there a way to get the author of a tweet id using Tweepy?

Upvotes: 1

Views: 996

Answers (1)

pii_ke
pii_ke

Reputation: 2891

For the author of that tweet, or retweeted/quoted status try.

status = api.get_status(id)
author = status.author
retweeted_status_author = status.retweeted_status.author
quoted_status_author = status.quoted_status.author

Upvotes: 1

Related Questions