botkit icon indicating copy to clipboard operation
botkit copied to clipboard

Quick Replies are not supported by Botkit? [Facebook]

Open morsidi opened this issue 10 years ago • 5 comments

Has anyone managed to get it to work with convo.say/ask ?

morsidi avatar Sep 18 '16 12:09 morsidi

@morsidi Are you using the latest version of Botkit? Quick replies should work. Please paste the code you are using to send the quick replies.

alaahaytham avatar Sep 30 '16 08:09 alaahaytham

controller.hears(['raleigh'], 'message_received', function(bot,message){ bot.reply(message, { "text": "What day would you like to go out?", "quick_replies": [ { "content_type": "text", "title": "Thursday", "payload": "thursday_test" }, { "content_type": "text", "title": "Friday", "payload": "friday" }, { "content_type": "text", "title": "Saturday", "payload": "saturday" } ] }) })

chriscomrie avatar Oct 01 '16 16:10 chriscomrie

controller.on('facebook_postback', function(bot, message) { if (message.payload == "raleigh_test") { bot.reply(message, { "text": "What day would you like to go out?", "quick_replies": [ { "content_type": "text", "title": "Raleigh", "payload": "raleigh_test" }, { "content_type": "text", "title": "Chapel Hill", "payload": "chapel_hill" }, { "content_type": "text", "title": "Boone", "payload": "boone" } ]

    },
            function(response, convo) {
            // whoa, I got the postback payload as a response to my convo.ask!
            convo.next();
        }
    )}
})

chriscomrie avatar Oct 01 '16 16:10 chriscomrie

The issue here seems to be that the current changes that came with Messenger API 1.1 have not been fully implemented in botkit just yet.

Compare #306 for instance (QuickReplies) and #305 for the starting point.

This has been merged into master, but not made it into a release version (https://github.com/howdyai/botkit/releases).

Latest tagged release was v0.2.2 which came out in June (before Messenger API 1.1 on July 1st).

So my (hopefully temporary) solution is: Manually checkout current master branch instead of relying on a pinned version.

bjoernklose avatar Oct 02 '16 20:10 bjoernklose

0.4 includes these changes!

benbrown avatar Oct 07 '16 20:10 benbrown