Search code examples
jsonlistapitwittertweets

Twitter how to list screename of people who retweeted a (the same) tweet


When a tweet is tweeted how do I get the name of the people that retweeted that tweet. On Twitter you can see their profile image. But using the infos in the JSON of the tweet how can I retrieve that list of screename?


Solution

    1. Get the id of the tweet.
    2. Get up to 100 retweets using statuses/retweets documented here https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-retweets-id
    3. Each retweet has a user property which contains their screen_name and other info.