LoginSignup
24
20

More than 5 years have passed since last update.

twitterのaccess tokenを取得する

Last updated at Posted at 2014-03-09

twitter APIを使って開発中にOAuthトークンを取得するのが面倒というかよくわからなかったのでメモ。

必要なもの

インストールする

$ gem install get-twitter-oauth-token

使う

コマンドラインからget-twitter-oauth-token起動
対話形式でConsumer Key, Consumer Secretが聞かれるのでtwitterアプリのAPI Key, API Secretを入力。
入力すると、ブラウザが起動されて見慣れたtwitterの連携許可画面がでてくる。ここで許可した時に表示されるPINを"PIN:"に続いて入力する。
PIN入力されると、OAuthのToken, Secretが表示される。


Consumer Key: *input API Key*
Consumer Secret: *input API Secret*
PIN: *input PIN*
Token: *display OAuth token here*
Secret: *display OAuth secret here*
24
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
24
20