[C#] CoreTweetでツイートを取得する

inno
2021-09-29 14:58 56 0

CoreTweetでツイートを取得する方法

 

var screenName = "TBS";

 

var tokens = CoreTweet.Tokens.Create(

    "{API key}",

    "{API secret}",

    "{Access token}",

    "{Access token secret}");

 

var parm = new Dictionary<string, object>();

parm["count"] = 100;

parm["screen_name"] = screenName;

 

var tweets = await tokens.Statuses.UserTimelineAsync(parm);

 

foreach (var tweet in tweets)

{

    Console.WriteLine("{0}: {1}", tweet.User.ScreenName, tweet.Text);

}

コメント