Reputation: 1496
What would be the query to get the last 50 tweets from a given user (Ex:@Microsoft) using LinqToTwitter library?
I am authenticating as SingleUser since I was not able to authenticate with the application authentication.
var auth = new SingleUserAuthorizer()
{
Credentials = new SingleUserInMemoryCredentials()
{
ConsumerKey = "Key"
, ConsumerSecret = "Key"
, TwitterAccessToken = "Key"
, TwitterAccessTokenSecret = "key"
}
,
AuthAccessType = AuthAccessType.Write
};
Upvotes: 0
Views: 126
Reputation: 5682
I'm authenticating with an OAuth token, but I don't think it should be any different. Have you tried something like this?
var twitter = new LinqToTwitter.TwitterContext(auth);
var tweets = twitter.Status
.Where(t => t.Type == LinqToTwitter.StatusType.User && t.ID == "Microsoft")
.OrderByDescending(t => t.CreatedAt)
.Take(50);
Upvotes: 2