Terminalからツイートする方法 gem tを使って


Terminalからツイートできるgem t - peroon's diary


gem install t

パーミッションがないと言われたので,sudo gem install t

t authorize


Welcome! Before you can use t, you'll first need to register an application with Twitter. Just follow the steps below:

  1. Sign in to the Twitter Developer site and click "Create a new application".

  2. Complete the required fields and submit the form. Note: Your application must have a unique name. We recommend: "/t".

  3. Go to the Settings tab of your application, and change the Access setting to "Read, Write and Access direct messages".

  4. Go to the Details tab to view the consumer key and secret, which you'll need to copy and paste below when prompted.

とターミナル画面に出るので,手順に従ってTwitterアカウントでログイン後,Create a new applicationのボタンを押して,各項目を入力.Settingのタブの設定をRead, Write and Access direct messagesへ変更.Detailsのタブに表示されているconsumer keyと,consumer secretをそろぞれコピーして,ターミナル画面に順番に入力.

In a moment, you will be directed to the Twitter app authorization page. Perform the following steps to complete the authorization process:

  1. Sign in to Twitter.
  2. Press "Authorize app".
  3. Copy and paste the supplied PIN below when prompted.

Press [Enter] to open the Twitter app authorization page.



sferik/t github


ツイート方法は,はじめの記事で紹介されているように t update "ダミーテキスト"で行う.

t update "I'm tweeting from the command line. Isn't that special?"

Note: If your tweet includes special characters (e.g. !), make sure to wrap it in single quotes instead of double quotes, so those characters are not interpreted by your shell. (However, if you use single quotes, your Tweet obviously can't contain any apostrophes.)

sferik/t github