Top Tweet of My Tweets using ReTweet Logic

Aug 13, 2012 at 7:22 AM

Dear Friends,

I would like to get the Top 3 Tweets which i have tweeted based on the ReTweet count.

Detail Explanation:

Assume i have tweeted 10 Tweets. In that 8 Tweets are ReTweeted by some users 

Tweet 1 : ReTweeted by 3 People

Tweet 2: Retweeted by 5 People

......

Tweet 7 : Retweeted by 15 People

Tweet 8 : Retweeted by 1 People

 

The output for Top Tweets should be like this :

Tweet 7
Tweet 2
Tweet 1

How to achieve this. Any Suggestions?

 

Thanks

Nirmal

Coordinator
Aug 15, 2012 at 4:40 PM
Edited Aug 15, 2012 at 4:41 PM

Hi Nirmal,

  1. Do a Status/RetweetsOfMe query - http://linqtotwitter.codeplex.com/wikipage?title=Getting%20Statuses%20Retweeted%20About%20a%20User&referringTitle=Making%20Status%20Queries%20and%20Calls
  2. Use SinceID and MaxID to manage the tweets returned - https://dev.twitter.com/docs/working-with-timelines
  3. Do an orderby descending on RetweetCount from the returned Status entities - http://linqtotwitter.codeplex.com/wikipage?title=Status%20Entity&referringTitle=Getting%20Statuses%20Retweeted%20About%20a%20User
  4. Use .Take(3) on the results.
  5. Except for SinceID and MaxID, the ordering and filtering must occur on your client because Twitter doesn't do this. Essentially, you'll request all the tweets in the timeframe you need and then process the results to get what you're looking for.

Joe

Aug 17, 2012 at 6:30 AM

Hello Joe,

I have integrated with the same flow exactly what you have mentioned. 

Thanks for the detail explanation which cleared my query for some alternative APIs to achieve the same.

by the way,

For fetching these Tweet Information i am doing a UnAuthorized Calls and It works well

TwitterContext twitterCtx = new TwitterContext();

Is that OK, if i just use like this without any API Key/Consumer Key for just pulling some tweets based on screenName?

 

Thanks

Nirmal

 

 

 

 

 

Coordinator
Aug 17, 2012 at 5:06 PM

Some APIs, like Search, don't require authentication.  I'm updating the docs right now to indicate if the API requires authentication.

BTW, Twitter announced that it will be coming out with a new API v1.1, which will require that all calls be authenticated, but this won't affect you right now.

Joe