Beispiel #1
0
        private static async Task PullSentDirectMessages(TwitterCredentials credentials)
        {
            var service = new TwitterService(credentials.ConsumerKey, credentials.ConsumerSecret);
            if (!string.IsNullOrEmpty(credentials.AccessToken) || !string.IsNullOrEmpty(credentials.AccessTokenSecret))
            {
                service.AuthenticateWith(credentials.AccessToken, credentials.AccessTokenSecret);
            }

            var r = await service.ListDirectMessagesSentAsync(new ListDirectMessagesSentOptions
            {
                Count = 200
            });
            Console.WriteLine(r.Value == null ? 0 : r.Value.Count());
        }