user_timeline - how to recreate retweet url


#1

Disclaimer - Just getting started with twitter

The good - I’m able to use user_timeline to get back tweets from a screen name.

example - api.twitter…/user_timeline.json?screen_name=cnn&include_rts=1

The bad - The reponse doesn’t list the tweet URL, but from the screen name and Id, I can recreate it.

example - twitter.com/cnn/status/512610874323116032

The ugly - For retweets, I don’t see the retweet screen name, so I can’t recreate a url to the tweet.

example - getting tweets for cnn may have a retweet like “CNN iReport @cnnireport

From what I can tell, the user_timeline doesn’t tell me that the tweet was from “cnnireport”, so I don’t know how to create the twitter.com/XXXXXXXXXXXXXX/status/512610874323116032 url.

Am I missing something basic? Seems like this would be a common scenario. Can somebody give me a dope slap and get me on track?

All advice is appreciated


#2

Retweets returned by the API have a “retweeted_status” field that contains the full original tweet, including the original tweet id and user.


#3

Have you tried out the API Console Tool? You can paste your command into the form

https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=cnn&include_rts=1

A word search for retweeted_status will get you all the original retweeted tweets. Within each retweeted_status you will find a screen_name of the author of the retweeted tweet.