botkit icon indicating copy to clipboard operation
botkit copied to clipboard

bot.say doesn't work with facebook structured messages?

Open morsidi opened this issue 10 years ago • 3 comments

For some reason it doesn't work.. (I tested it on convo.say() and it worked there, but here I have to use bot.say since I initiate a message from the server).

bot.say({ text: { "attachment": { "type": "template", "payload": { "template_type": "generic", "elements": [{ "title": "TITLE", "subtitle": "SUBTITLE", "buttons": [{ "type":"postback", "title":"CTA", "payload":"payload_click" }]
}] } } }, channel: id });

morsidi avatar Jun 16 '16 15:06 morsidi

Getting the same for Slack bot. It looks like bot.say is not implemented https://github.com/howdyai/botkit/blob/master/lib/CoreBot.js#L897-L899

sporkd avatar Jul 05 '16 17:07 sporkd

bot.say() is not implemented in the Facebook implementation of botkit.

@peterswimm / @benbrown any thoughts on how this should be implemented?

agamrafaeli avatar Nov 25 '16 13:11 agamrafaeli

You can use bot.reply() or bot.replyWithTyping() or you can use convo.say() if you are in a conversation. All these work fine with botkit on FB.

Are you talking of using the same code you have for Slack to work on FB?

alexbudin avatar Nov 25 '16 15:11 alexbudin