1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Twitter Direct Message APIでチャットボット実装するのに使用したドキュメント一覧

Last updated at Posted at 2020-06-05

概要

Twitter上で初回問い合わせへの対応を行うチャットボットを作成するために、Direct Messageに関係するAPIの関連性を調べました。
これはそれをまとめたものです。
サンプルコードは記述しませんが、実装の手助けになれば幸いです。

※ 2019年末のドキュメントをQiita転載したものになります。情報が古い恐れがあります、ご容赦ください。

Direct Message API

基本的なドキュメントはここ
https://developer.twitter.com/en/docs/direct-messages/api-features

関連するドキュメント

Sending and receiving events
https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/overview
基本的なDMの送受信はこのAPIを使用する
オプションとしてQuick ReplyとButtonを定義することで,ユーザーに対して選択肢による返信を実装することが可能

Welcome Messages
https://developer.twitter.com/en/docs/direct-messages/welcome-messages/overview
初めてDM画面を開いたときに表示されるメッセージを設定することができる
ユーザーに対してこちらから情報を提示するために使用する

Quick Reply
https://developer.twitter.com/en/docs/direct-messages/quick-replies/overview
Quick Replyは文字列による選択肢を提供する
ユーザーは提供された選択肢を選ぶことで,選ばれた文字列をDM送信する

Button
https://developer.twitter.com/en/docs/direct-messages/buttons/overview
Buttonは所謂Call To Action(CTA)と呼ばれるもので,DM送信以外のアクションを選択肢として提供する
ユーザーは提供された選択肢を選ぶことで,選ばれたアクションが実行される(フォローを行うや,特定のURLに遷移させる)

QuickReplyを使用しPythonで実装されたドキュメント
https://medium.com/@torufurukawa/chatbot-with-twitter-direct-message-api-74fc46dca5d1
https://medium.com/@torufurukawa/twitter-direct-message-api-beta-2128bf0b2269

DMへの誘導

TweetからDMへ誘導するのに有効と思われるもの

ダイレクトメッセージカード

https://business.twitter.com/ja/help/campaign-setup/Create_DM_Card.html
※現在個人広告主は利用ができないため要問合せ

CTA

ツイートにもCTAを使用することができる
https://business.twitter.com/ja/help/campaign-editing-and-optimization/public-to-private-conversation.html
https://gist.github.com/citrusui/b1acfa1bc13a0dcdbe8307668fa18f21

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?