在尝试使用开发人员预览任务模块时,我遇到了一个奇怪的问题。
团队没有显示我的模块,总是在控制台上告诉我:
<BotError>Error when processing invoke response: Payload is incorrect, field is in the wrong format: task.value
我要发送的是:
{
"task": {
"value": {
"url": "https://<ourbaseserviceurl>",
"title": "Microsoft Ignite 2018 Vision Keynote",
"height": 700,
"width": 1000,
"fallbackUrl": "<ourbaseserviceurl"
},
"type": "message"
}
}
我试着用样品,但即使这样似乎也不能正常工作。该URL位于应用程序的allowedurls中,与我们用来与机器人通信的URL相同,机器人通常工作正常。
在传递TaskInfo对象时,请将任务类型设置为continue。这是文档
{
"task": {
"type": "continue"
"value": {
"url": "https://<ourbaseserviceurl>",
"title": "Microsoft Ignite 2018 Vision Keynote",
"height": 700,
"width": 1000,
"fallbackUrl": "https://<ourbaseserviceurl>"
},
}
}
以下是如何在弹出消息框中显示值:
{
"task": {
"type": "message",
"value": "Message text"
}
}
如果您遇到任何问题,请尝试告诉我们。