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.
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);
The method is a little different in updated versions. Its now called ListTweetsOnUserTimeline()
and it your going to pass through options now like so:
var currentTweets = service.ListTweetsOnUserTimeline(new ListTweetsOnUserTimelineOptions
{
ScreenName = "yourTwitterHandle",
Count = 5,
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With