Skip to content

Instantly share code, notes, and snippets.

@potato4d
Last active December 14, 2016 15:43
Show Gist options
  • Save potato4d/52fa602a030eaebde96721b962d4cbfa to your computer and use it in GitHub Desktop.
Save potato4d/52fa602a030eaebde96721b962d4cbfa to your computer and use it in GitHub Desktop.
electron-oauth-twitterでElectronでのTwitter OAuth認証を手軽に行う ref: http://qiita.com/potato4d/items/a4a2c9cb5667135f0748
const dialog = require('electron').dialog;
const OauthTwitter = require('electron-oauth-twitter');
const twitter = new OauthTwitter({
key : "YOUR_TWITTER_KEY",
secret: "YOUR_TWITTER_SECRET",
});
twitter.startRequest()
.then((result) => {
dialog.showErrorBox('Status', 'Token: ' + result.oauth_access_token + '\nSecret: ' + result.oauth_access_token_secret);
}).catch((error) => {
console.error(error, error.stack);
});
$ npm i -S electron-oauth-twitter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment