LoginSignup
2
2

More than 3 years have passed since last update.

Twitter広告APIを利用してキャンペーンを作ってみる その1~TwitterAPI申請編~

Last updated at Posted at 2020-09-13

経緯

私が所属している会社では待ラノという小説投稿サイトを運営しています。
待ラノではオススメ小説のランキング上位5作を定期的にTwitterの公式アカウントで紹介しています。
紹介された小説をTwitter広告のキャンペーンを利用してプロモーションをしようってなりました。

そもそもTwitter広告のキャンペーンって何?

Twitter広告のキャンペーンですが、簡単いうと1日にかける予算や期間内にかける総予算を指定して、Twitterに広告を出す機能です。

Twitter広告APIでキャンペーンを作る理由

1つのキャンペーンで複数のツイートをプロモーションする場合、1日にかける予算を一気に消化されてしまいます。
しかもどのツイートにどれだけ予算が消化されているかがわかりません。
そのため、1つのツイートに1キャンペーンを紐付けることで消化される予算の見える化を行うことになりました。

ただ手動でTwitterの広告コンソールから、1ツイートに1キャンペーンを毎回作ることになると結構手間です。
というわけで、Twitter広告APIを利用して動的にキャンペーンを作成することになりました。

Twitter広告APIでキャンペーンを作成するためには

以下の手順が必要です。

  1. Tiwtterアカウントを作成する(省略)
  2. Tiwtterアカウントにメールアドレスと電話番号を設定する(省略)
  3. TiwtterAPIの利用申請をする ←イマココ
  4. TiwtterAPIのAPIキーとトークンを取得する
  5. TiwtterAPIを利用してツイートをする
  6. Tiwtter広告APIの利用申請をする
  7. Tiwtter広告APIでを利用してツイートを使ったキャンペーンを作る

今回は3の【TiwtterAPIの利用申請をする】について説明していきます。

1.Twitter Developerのページにアクセス

まずはTwitterにログインした状態で、Deeloperサイトへアクセスします。

2.「Create an app」ボタンをクリックします。

スクリーンショット 2020-09-14 4.32.14.png

3.デベロッパーツールの利用目的を選択します。

今回はTwitter広告APIを利用するため「Publishing ads programatically」を選択します。
「Doing sometihg else」でもOK。
ここは厳密に回答しなくても問題はありません。
スクリーンショット 2020-09-14 4.23.55.png

4.内容を確認して次へ進みます。

スクリーンショット 2020-09-14 4.41.55.png

5.所属組織について記入します。

以下の項目を入力していきます。

  • Team name(TwitterAPIのアカウント名)」
  • Legal entity name(所属している企業名)」
  • Organization Twitter @ username(TwitterのアカウントID)」
  • Organization primary country of operation(所属している企業の主な国)」
  • How do you categorize your organization?(所属している企業の業種)」
  • What industries do you / will you serve?(自分が関わっている業種)」

スクリーンショット 2020-09-14 4.47.13.png

6.英文でTwitterAPIの利用目的を回答していきます。

まずは「In English, please describe how you plan to use Twitter data and/or APIs. The more detailed the response, the easier it is to review and approve.(Twitter APIまたはTwitterデータの利用方法を教えて下さい)」

今回、下記のように回答しました。

1.私のウェブサイトに投稿した記事をTwitterのAPIを利用して、Twitterのタイムラインにも自動的に表示されるようにしたい。
2.Twitterのタイムラインに自動的に表示させるのは1日に1回程度です。
3.Twitter APIを利用しTwitterからのコンテンツを取得して、Twitter以外で表示させることはありません。

これを英文にすると下記になります。

1.I want to make sure that articles posted on my website are automatically displayed on Twitter's timeline as well, using Twitter's API.
2.I would like to have an article automatically displayed on my Twitter timeline about once a day.
3. We do not use the Twitter API to retrieve content from Twitter and display it outside of Twitter.

スクリーンショット 2020-09-14 5.05.43.png


「Are you planning to analyze Twitter data?(ツイッターのデータを利用しますか?)」

今回は利用しないので「No」にします。
スクリーンショット 2020-09-14 5.12.02.png


「Will your app use Tweet, Retweet, like, follow, or Direct Message functionality?(アプリはツイート、リツイート、お気に入り、フォロー、ダイレクトメッセージを利用するか?)」

今回は下記のように回答しました。

1.私のウェブサイトに投稿した記事をTwitterのAPIを利用して、Twitterのタイムラインにも自動的に表示されるようにしたい。
2.Twitterのタイムラインに自動的に表示させるのは1日に1回程度です。

これを英文にすると下記になります。

1.I want to make sure that articles posted on my website are automatically displayed on Twitter's timeline as well, using Twitter's API.
2.I would like to have an article automatically displayed on my Twitter timeline about once a day.

スクリーンショット 2020-09-14 5.17.44.png


「Do you plan to display Tweets or aggregate data about Twitter content outside of Twitter?(Twitter以外のTwitterコンテンツに関するツイートを表示したり集計データを表示するか?)」

今回は利用しないので「No」にします。
スクリーンショット 2020-09-14 5.27.12.png


「Will your product, service or analysis make Twitter content or derived information available to a government entity?(あなたの製品・サービス,または分析によって,Twitterコンテンツまたは派生情報が政府機関が利用可能になりますか?)」

該当しないため「No」にします。
スクリーンショット 2020-09-14 5.30.15.png

7.内容を確認して次へ進みます。

スクリーンショット 2020-09-14 5.32.41.png

8.利用規約に同意して申請します。

スクリーンショット 2020-09-14 5.35.55.png

9.メールアドレスの認証メールが届きます。

以下のようなメールが届き、メールに記載されている「Confirm your email」押して認証を完了します。
スクリーンショット 2020-09-14 10.24.30.png

10.Twitter社からTwitterAPIの使用目的についての確認メールが届きます。

以下のようなメールが届き、こちらのメールに使用目的を記載して返信します。
スクリーンショット 2020-09-15 9.41.08.png

11.Twitterからの申請の承認メールが届きます。

以下のようなメールが届いたら承認が完了です。
スクリーンショット 2020-09-14 10.33.17.png


■「Twitter広告APIを利用してキャンペーンを作ってみる 」シリーズ

  1. その1~TwitterAPI申請編~ ←イマココ
  2. その2~TiwtterAPIのAPIキーとトークンの取得編~
  3. その3~TwitterAPIでツイート編~
  4. その4~Tiwtter広告APIのAPI申請編~
  5. その5~Twitter広告APIでキャンペーン作成編~
2
2
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
2
2