如何解决Dialogflow实现:如何发送多个有效载荷自定义Messenger?
实际上,我尝试通过“ dialogflow-fulfillment”库上的agent.add(new Payload)在Facebook Messenger上发送带有模板的多个消息:“ ^ 0.6.1”像这样:
Message with multiple template
当我在dialogflow控制台上执行此操作时,我没有问题,它可以正常工作:
custom payload on the dialogflow
但是我无法在我的函数nodejs上执行此操作,我只能发送一个有效载荷,而不能发送更多。 我已经尝试过了,但是没有结果(消息“ Test!”除外):
function test_intent(agent) {
var payloadFacebook = {
"messages": [
{
"facebook": {
"attachment": {
"type": "template","payload": {
"template_type": "button","text": "Can I ask you a few questions?","buttons": [
{
"title": "Yes","payload": "Yes","type": "postback"
},{
"payload": "No","title": "No","type": "postback"
}
]
}
}
}
},{
"facebook": {
"attachment": {
"type": "template","buttons": [
{
"type": "phone_number","title": "Yes","payload": "0606060606"
}
]
}
}
}
},"text": "Take that 3","buttons": [
{
"type": "web_url","title": " (Théorie)","url": "https://google.fr/"
}
]
}
}
}
}
],"source": "facebook","speech": ""
};
agent.add("Test !");
agent.add(new Payload(agent.FACEBOOK,payloadFacebook,{ sendAsMessage: true,rawPayload: true }));
}
您是否有解决方案,请在对话框流控制台上在nodejs上发送多个自定义有效负载?
谢谢
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。