I’m doing something like this to get the tweets from a list in twitter:
twitterCtx = new TwitterContext();
var Tweets = from tweet in twitterCtx.List
where tweet.Type == ListType.Statuses && tweet.OwnerScreenName == osn &&
tweet.Slug == listName &&
tweet.Count == 100
select tweet.Statuses;
return Tweets.SingleOrDefault().Where(x => x.CreatedAt > DateTime.Now.AddDays(-numOfDays)).GroupBy(p => p.User.Name).Select(g => g.First());
I’m getting the latest tweet from a user in the list using the last bit:
.GroupBy(p => p.User.Name).Select(g => g.First());
how can i get the latest 5 tweets by them?
I haven’t used the Twitter API, but the obvious first thought is to change it to:
Then you’d get the tweets with something like: