How to get the total of FollowerCount of a Retweeted tweet

Apr 24, 2014 at 8:01 PM
Edited Apr 25, 2014 at 12:29 AM
I want to see the how many people a tweet reached by retweeting.
I tried this but no luck
How can I get the total of followercount of retweeters of a tweet
        await auth.AuthorizeAsync();
        using (var twitterCtx = new TwitterContext(auth))
        {
            List<Status> tweets = await (from tweet in twitterCtx.Status
                                         where (tweet.Type == StatusType.User)
                                               && tweet.ScreenName == twUrl.GetTwitterUsername()
                                               && tweet.Count == 200
                                               && tweet.RetweetCount > 0
                                               && tweet.CreatedAt < endDate && tweet.CreatedAt > startDate
                                              && tweet.IncludeRetweets == false
                                               && tweet.TrimUser == false
                                         select tweet).ToListAsync();
            int reach = 0;
            foreach (var tw in tweets)
            {
                var reTweets = await (from tweet in twitterCtx.Status
                                      where tweet.Type == StatusType.Retweets
                                      && tweet.ID == tw.StatusID
                                         && tweet.TrimUser == false
                                      select tweet).ToListAsync();

                if (reTweets != null)
                    reTweets.ForEach(tweet =>
                    {
                        if (tweet != null && tweet.User != null)
                            reach += reTweets.Sum(retw => tweet.User.FollowersCount);
                    });
            }
            return tweets;
        }
Coordinator
Apr 25, 2014 at 2:02 PM
Hi,

The Twitter API doesn't offer a query that returns follower/following counts. The most efficient way to do this is to do a query for the follower IDs. Here's the docs on that:

https://linqtotwitter.codeplex.com/wikipage?title=Listing%20Followers&referringTitle=Handling%20Friendships

@JoeMayo