Frank Rosario Frank Rosario - 2 months ago 21
ASP.NET (C#) Question

Tweetsharp: Retrieve list of tweets from a specific user

Couldn't find this in the official TS documentation, other Tweetsharp SO posts, or digging through the library's classes; so I thought I'd ask. How do you retrieve a list of the most recent Tweets from a specific user using Tweetsharp?

You can assume I'm authenticating with an account that is following the user whom's tweets I want to retrieve. I may even be able to authenticate with the account of the user itself.

Answer

Use ListTweetsOnSpecifiedUserTimeline().

For example:

var service = new TwitterService(ConsumerKey, ConsumerSecret);
service.AuthenticateWith(AccessToken, AccessTokenSecret);
var currentTweets = service.ListTweetsOnSpecifiedUserTimeline(screenName:"screen name", page:1, count:100);