Skip to content

Instantly share code, notes, and snippets.

@marihachi
Created July 24, 2015 02:53
Show Gist options
  • Save marihachi/70ef883a6e34bb399f74 to your computer and use it in GitHub Desktop.
Save marihachi/70ef883a6e34bb399f74 to your computer and use it in GitHub Desktop.
public partial class Form1 : Form
{
private Twitch.Twitter tw { set; get; }
private async void Form1_Load(object sender, EventArgs e)
{
// 今回はTwitterForAndroidのAPIキーを使用
tw = new Twitch.Twitter("3nVuSoBZnx6U4vzUxf5w", "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys");
await tw.Authorize();
}
private async void button1_Click(object sender, EventArgs e)
{
// OAuthの場合は
var authedTw = await tw.AuthorizePin("PINコード");
// xAuthの場合は
var authedTw = await tw.AuthorizeXAuth("ScreenName", "Password");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment