Frank Rosario
Frank Rosario

Reputation: 2661

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.

Upvotes: 7

Views: 10536

Answers (2)

Connor Williams
Connor Williams

Reputation: 319

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,
                });

Upvotes: 1

Ronald Boehm
Ronald Boehm

Reputation: 206

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);

Upvotes: 19

Related Questions