Twitter streaming api - how to read retweets
Hey. I successfully installed Twitter Streaming API. I can read statuses but don't know exactly how 开发者_Go百科to distinguish between tweets and retweets.
http://dev.twitter.com/pages/tweet_entities
So my questions are - how do you know that a is a tweet/retweet - how can I get the list of user ids that have retweeted the original tweet
Thx.
{ "retweeted": true }
is only the case if user logged into the streaming API did the retweeting.
See http://blog.programmableweb.com/2010/08/30/twitter-api-adds-retweet-count-and-more/
If you are looking for particular RTs lets say from Jack and Paul. Jut track "RT @Jack" and "RT @Paul".
In the JSON you get back from the API, you'll get data like this:
{
"retweeted":false,
"text":"Testing streaming api",
"geo":{...}
}
Simply get the value of retweeted
and you have your answer.
精彩评论