I am trying to extract the replies of each tweets from twitter but I can't find the way to do. Now, I can authenticate a twitter API. Authenticated API image
Asked
Active
Viewed 391 times
0
-
Does this answer your question? [Replies to a particular tweet, Twitter API](https://stackoverflow.com/questions/2693553/replies-to-a-particular-tweet-twitter-api) – PacketLoss Sep 03 '20 at 05:15
1 Answers
0
Hi Jarimjim welcome to stackoverflow.
For Authentication below code will help you because you're using tweepy
import tweepy
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
//Example to test authentication.
public_tweets = api.home_timeline()
for tweet in public_tweets:
print(tweet.text)
Now if you want to get all retweets by other you can do try this.
API.retweets_of_me([since_id][, max_id][, count][, page])
Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
Parameters:
- since_id – Returns only statuses with an ID greater than (that is, more recent than) the specified ID.
- max_id – Returns only statuses with an ID less than (that is, older than) or equal to the specified ID.
- count – The number of results to try and retrieve per page.
- page – Specifies the page of results to retrieve. Note: there are pagination limits.
Return type:
list of Status
objects
All these things are extracted from http://docs.tweepy.org/en/latest/
How to get consumer key and secret visit this link
How to get access token and access secret visit this link

Adam Strauss
- 1,889
- 2
- 15
- 45