Es ist ein spät-Update wird aber jemand nützliche Zeit sparen. Mit Hilfe des folgenden Code können Sie mehrere Tasten auf Facebook chatbot zeigen. Technologie für die Entwicklung ist der Knoten js, botbuilder, luis.
var msg = new builder.Message(session);
msg.sourceEvent({
"facebook": {
"attachment": {
"type": "template",
"payload": {
"template_type": "button",
"text": "You can either hit 'FAQ' to get the help, or head to the Mannual Help for getting help.",
"buttons": [
{
"type": "web_url",
"url": 'https://stackoverflow.com/',
"title": "Mannual Help"
},
{
"type": "postback",
"title": "FAQ",
"payload": "FAQ_SELECTED_BY_USER"
}]
}
}
}
});
session.send(msg);
