Help us understand the problem. What is going on with this article?

LINE Messaging API新機能のクイックリプライを使ってみた

More than 1 year has passed since last update.

クイックリプライとは

・クイックリプライボタンを設定したメッセージをbotから受信すると,画面下部にボタンが出現する
・ボタンを押すとボタンが消える(次のメッセージが送信されるとボタンが消える)
・一つのメッセージにつき最大13個までのボタンを設定できる
・設定できるアクションは,「カメラアクション」,「カメラロールアクション」,「位置情報アクション」,「ポストバックアクション」,「メッセージアクション」,「日時選択アクション」のみで,urlアクション等は設定できない
※「カメラアクション」,「カメラロールアクション」,「位置情報アクション」はクイックリプライ機能専用のアクション

とりあえずJSON

{
    "type": "text",
    "text": "選択してください",
    "quickReply": {
        "items": [
            {
                "type": "action",
                "action": {
                    "type": "camera",
                    "label": "カメラ"
                }
            },
            {
                "type": "action",
                "action": {
                    "type": "cameraRoll",
                    "label": "カメラロール"
                }
            },
            {
                "type": "action",
                "action": {
                    "type": "location",
                    "label": "位置情報"
                }
            },
            {
                "type": "action",
                "action": {
                    "type": "postback",
                    "label": "ポストバック",
                    "data": "test"
                }
            },
            {
                "type": "action",
                "action": {
                    "type": "message",
                    "label": "メッセージ",
                    "text": "test"
                }
            },
            {
                "type": "action",
                "action": {
                    "type": "datetimepicker",
                    "label": "日時選択",
                    "data": "datetime",
                    "mode": "datetime"
                }
            }
        ]
    }
}

※必要に応じてボタンにアイコンをつけることが出来る
例:

{
    "type": "action",
    "imageUrl": "https://example.com/sushi.png",
    "action": {
        "type": "message",
        "label": "メッセージ",
        "text": "test"
    }
}

あとは皆さんの言語に応じてよしなに

ソースコードいろいろ

Google Apps Script

https://github.com/shinbunbun/quickreply/tree/Google-Apps-Script

AWS lambda

https://github.com/shinbunbun/quickreply/tree/Lambda(Node.js)

bot紹介

時間割bot

クイックリプライを沢山使ってる
友だち追加


Twitter

https://twitter.com/unix_yuto

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away