[Header]
ブログやホームページを更新した際、広報としてTwitterへ投稿したいなーと思いまして、PHPを使ってTwitterへ投稿する方法など、少しまとめてみました。今回は、Twitterアプリケーション作成の準備について書きたいと思います。

はじめに
PHPでTwitterの投稿やツィートを取得するプログラムを作成する為には、事前にTwitterの開発者向けサイトにて「Consumer key」「Consumer secret」「Access token」「Access token secret」の取得が必要です。以下サイトからアプリケーション登録がおこなえます。
Twitter Application Management
アプリケーション新規作成
Twitter Application Management (Twitterアカウントでログインする必要があります。)の画面右上にあるボタン「Create New App」を押下します。

「Create an application」 画面に遷移しますので、以下項目に入力
- Name:アプリケーションの名前(日本語でOK)
- Description:アプリケーションの説明(日本語でOK)
- Website:自分のサイト等のURLを入力
- Callback URL:特に入力必須ではないです。
入力が完了したら、
チェックボックス「Yes, I have read and agree to the Twitter Developer Agreement.」にチェックを入れ、ボタン「Create your Twitter application」を押下します。
Consumer Key(API Key)とConsumer Secret (API Secret)の取得

「manage keys and access tokens」をクリックします。

「Consumer Key (API Key)」と「Consumer Secret (API Secret)」を控えておきます。
Access Token と Access Token Secret の取得
画面下に移動し「Your Access Token」のボタン「Create my access token」を押下。

「Access Token」と「Access Token Secret」を控えておきます。
まとめ
- Consumer Key (API Key)
- Consumer Secret (API Secret)
- Access Token
- Access Token Secret
以上、4項目をアプリケーションを作成する際使用しますので、控えておきます。
これで、アプリケーション作成準備が整いました。
[A8_TechAcademy065]
[Footer]