Currently, I am developing a DB2 database-driven IBM Watson Assistant chatbot in Facebook page, integrated with IBM Cloud Functions. I have established the connection and able to send and receive messages on Facebook.
Now, I am trying to send Generic templates referencing to Facebook developer doc and implement a carousel of cards in facebook with images, titles and buttons.
Things I tried: According to IBM documentation, I tried message.attachment.payload (specified in facebook developer doc) inside output.facebook in Watson JSON editor.
{
"output": {
"generic": [{
"values": [{
"text": "ok"
}],
"response_type": "text",
"selection_policy": "sequential"
}],
"facebook": {
"text": "Hi,\n\nWe have a great giveaway for you, but first we’d like for you to follow us so that you can stay updated on the latest news and trends.\n\nPlease take a moment to follow us and let me know when you've followed us by typing DONE:\n\n",
"buttons": [{
"url": "https://www.facebook.com/ibmcommerce/",
"type": "web_url",
"title": "Follow IBM Commerce",
"messenger_extensions": "false",
"webview_height_ratio": "full"
}],
"template_type": "generic"
}
}
}
Also, I tried implementing the solution provided in IBM Watson developer forum
{
"output": {
"facebook": {
"message": {
"attachment": {
"type": "template",
"payload": {
"text": "Hi,\n\nWe have a great giveaway for you, but first we’d like for you to follow us so that you can stay updated on the latest news and trends.\n\nPlease take a moment to follow us and let me know when you've followed us by typing DONE:\n\n",
"buttons": [
{
"url": "https://www.facebook.com/ibmcommerce/",
"type": "web_url",
"title": "Follow IBM Commerce",
"messenger_extensions": "false",
"webview_height_ratio": "full"
}
],
"template_type": "button"
}
}
}
}
}
}
Neither of the solutions works for me. Kindly help me in figuring out what I am missing.
Any help is much appreciated. Thanks in advance!
2020-04-01
)output.facebook
useoutput.integrations.facebook