Code Camp 2011 の Twitterizer-TLHCodeCamp2011.zip のサンプルより。
using Twitterizer;
OAuthTokens tokens = new OAuthTokens()
{
ConsumerKey = “…”,
ConsumerSecret = “…”,
AccessToken = “…”,
AccessTokenSecret = “…”
};
TimelineOptions options = new TimelineOptions();
options.Count = 200;
IAsyncResult asyncResult = TwitterTimelineAsync.HomeTimeline(tokens, options, new TimeSpan(0, 1, 0), res =>
{
if (res.Result != RequestResult.Success)
{
BeginInvoke(new Action(() =>
{
MessageBox.Show(…);
}));
return;
}
BeginInvoke(new Action(() =>
{
this.TimelineGridView.DataSource = res.ResponseObject;
}));
});
コメントを残す