gaussblurinc
gaussblurinc

Reputation: 3682

Twitter API: How to get retweets for retweet?

I want to get all retweets, that similar to current retweet.

What I mean:

If someone makes retweet, I want to take his tweet id (retweet id) and take all retweets of original tweet, that user retweet.

So: original tweet -> user_retweet_id

get statuses/retweets/user_retweet_id.json 

/*as statuses/retweets/original_tweet_id*/

Is it possible?

P.S: I ask it because if I took general information about retweet (user_retweet_id), I get an information about original tweet (retweet_count), but I can't get retweets from it for original tweet.

Upvotes: 4

Views: 1645

Answers (2)

chirag singla
chirag singla

Reputation: 1

There's no direct method for that but what you can do is

  • Extract main username of user who actually posted that tweet
  • Extract his timeline using twitter.showTimeline()
  • Then find your tweet using String matching
  • This will give you original tweet ID
  • Then you can find most 100 recent retweets using that oiginal tweet ID

I am using twitter4j for this

Upvotes: 0

cubbuk
cubbuk

Reputation: 7920

As far as I know there is no information for getting retweet of a retweet, as essentially you are retweeting the original post. Just retweet an already existing retweet and you will see that you will actually retweeted the original tweet without leaving any mark about the intermediate step.

Upvotes: 3

Related Questions