python3でTwitter APIからデータを取得
環境
CentOS6
python3.5
手順
Twitterアカウント作成後、以下にアクセス。
※アカウント登録には電話番号のひも付けが必要
https://apps.twitter.com/
「Create New App」をクリック
web siteには「http://127.0.0.1」を入力しても大丈夫だった。
登録後、「Keys and Access Tokens」タブでAPI Keyが確認できる。
requests-oauthlibインストール
pip install requests-oauthlib
API Keyの管理は設定ファイルで管理する。
[twtter_api] consumer_key=***** consumer_key_secret=***** access_token=***** access_token_secret=*****
下記サイトを参考にAPI Key管理方法だけ変更して動いた。