0
votes

I want to get users who retweeted my tweets

 $tweets2 = $connection->get("https://api.twitter.com/1.1/statuses/retweets_of_me.json");

Gives me list of my tweets which are retweed by other.

But it does not provide me details about who retweeted it. Any way to do this?

CAn I get this details using tweet ID?

In version 1.o

https://api.twitter.com/1/statuses/21947795900469248/retweeted_by.json

it was there but not present in version 2.:

I tried this: https://api.twitter.com/1.1/statuses/retweet/241259202004267009.json

but does not show anny response

Any idea or help is appreciated.

Scenaraio is like this:

user1 retweets me 5 times, user2 retweets me 7 times, that means I had 12 retweets.
User1 has 500 followers, user2 has 100 followers, that means my retweet reach was 5x500 + 7x100 = 3200. So, on my webpage, I would like to see 12 retweets and 3200 retweet reach.

1

1 Answers

-1
votes

Use this api https://dev.twitter.com/docs/api/1.1/get/statuses/retweets_of_me to get the ID of the users.

Pass comma-separated user_id or screen_name to this https://dev.twitter.com/docs/api/1.1/get/users/lookup to get the info about the users.