- For example,retweet https://twitter.com/justinbieber/status/228608353604100098
- Search that retweet.
http://search.twitter.com/search.json?q=thanks+for+the+stamp
Result:
"text":"RT @justinbieber: @TheEllenShow thanks for the stamp. I'm stamping your show...why? because i luv yah",
"to_user":null,
"to_user_id":0,
"to_user_id_str":"0",
"to_user_name":null,
"in_reply_to_status_id":228583249516052481,
"in_reply_to_status_id_str":"228583249516052481"
and,search original tweet.
http://search.twitter.com/search.json?q=thanks+for+the+stamp+exclude:retweets&max_id=228608353604100100
Result:
{"created_at":"Thu, 26 Jul 2012 21:50:53 +0000","from_user":"justinbieber","from_user_id":27260086,"from_user_id_str":"27260086","from_user_name":"Justin Bieber","geo":null,"id":228608353604100098,"id_str":"228608353604100098","iso_language_code":"en","metadata":{"result_type":"recent"},"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/2385531870\/ffb6obdzkxc3pk7lvbw2_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/2385531870\/ffb6obdzkxc3pk7lvbw2_normal.jpeg","source":"<a href="http:\/\/twitter.com\/">web<\/a>",
"text":"@TheEllenShow thanks for the stamp. I'm stamping your show...why? because i luv yah",
"to_user":"TheEllenShow",
"to_user_id":15846407,
"to_user_id_str":"15846407",
"to_user_name":"Ellen DeGeneres",
"in_reply_to_status_id":228583249516052481,
"in_reply_to_status_id_str":"228583249516052481"
}
I hope that "to_user" of retweet is "TheEllenShow" also.
Replies
The Search API is unversioned and its response formats have not really evolved much over the past several years. This is the current expected behavior in this particular case. Some day there will be a search API that returns standard tweet objects and you'll see more consistency then. You might find it beneficial to use ?include_entities=true when using the Search API and extracting user_mentions.