LoginSignup
0
0

More than 5 years have passed since last update.

twitteroauthのインストール方法

Posted at

Twitteroauthのはじめかた

1.phpの開発環境を整える
今回はローカル開発環境。
vagrantを使用し、仮想サーバーを立ち上げて環境設定。
(わからない人は、「仮想サーバー php」とか「ローカル開発環境 php」で検索)

ちなみに使用しているツールは、「putty」、「cyberduck」、「atom」

2.Composerをインストール
公式Composerダウンロードサイト
以下のコードをコマンドに入力すればOK

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

ディレクトリを見ると、「composer.phar」ファイルが追加されているのが分かる。

3.Twitteroauthをインストール
公式Twitteroauthサイト
サイトでは以下のようにしろと書いてあるが、これではできない。

composer require abraham/twitteroauth

なので、こうする。

php composer.phar require abraham/twitteroauth

これでセットアップ完成。
ディレクトリを見ると色々入っている。

0
0
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
0
0