0

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

        };
Oakcool
  • 1,470
  • 1
  • 15
  • 33

1 Answers1

2

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);
TheEvilPenguin
  • 5,634
  • 1
  • 26
  • 47