While creating a conversation for Facebook Messenger, after creating a conversation, the response is only catched if the user replies with some text, but a postback does not trigger the conversation reply.
Is this a bug or a future improvement?
controller.hears(['START_CONVERSATION'], 'facebook_postback', (bot, message) => {
bot.startConversation(message, function(err, convo) {
convo.ask({
attachment: {
type:"template",
payload:{
template_type:"generic",
elements: [{
title: "Press Yes or No",
buttons:[{
type:"postback",
title:"Yes 😀",
payload:"SAID_YES"
},
{
type:"postback",
title:"No 😔",
payload:"SAID_NO"
}]
}]
}
}
}
}, (response,convo) => {
// Except to receive either SAID_YES or SAID_NO
// Only receives "text" (if user writes), no postbacks
console.log(response)
})
})
})
I'm going to patch this by myself
I am facing the same issue :), any updates on this?
receive_via_postback: true is what youre looking for
Goes into your controller like so
var controller = Botkit.facebookbot({
access_token: process.env.access_token,
verify_token: process.env.verify_token,
receive_via_postback: true,
})
Checkout the facebook botkit docs for more
info
On Tue, Jan 24, 2017 at 11:13 AM joekh notifications@github.com wrote:
I am facing the same issue :), any updates on this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/howdyai/botkit/issues/604#issuecomment-274850629, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AMUR219fyjFYMX7nz53lqRjnoiYqrGaeks5rViNFgaJpZM4LnYnk
.
Here's a working link: https://github.com/howdyai/botkit/blob/master/docs/readme-facebook.md
in @jonchurch 's defense it worked when he posted it :D I edited his post on his behalf.
Most helpful comment
receive_via_postback: trueis what youre looking forGoes into your controller like so
Checkout the facebook botkit docs for more
info
On Tue, Jan 24, 2017 at 11:13 AM joekh notifications@github.com wrote: