嗨,我想通过对话流程将多张卡片发送到所有平台。
我的json是:
{
"fulfillmentText": "This is a text response",
"fulfillmentMessages": [
{
"card": {
"title": "card title",
"subtitle": "card text",
"imageUri": "https://assistant.google.com/static/images/molecule/Molecule-Formation-stop.png",
"buttons": [
{
"text": "button text",
"postback": "https://assistant.google.com/"
}
]
}
}
]
这是行不通的,有人可以建议,我该如何发送json,以便显示多行消息
请帮助
答案 0 :(得分:0)
您需要在您的Webhook履行代码中传递这些数据,
agent.add(new Card({
title: `Title: this is a card title`,
imageUrl: imageUrl,
text: `This is the body text of a card. You can even use line\n breaks and emoji! ?`,
buttonText: 'This is a button',
buttonUrl: linkUrl
})
);
您可以查看详细说明here,