【发布时间】:2018-03-01 06:54:37
【问题描述】:
使用 C# 创建了一个机器人并发送带有按钮的 herocard,它可以在网络聊天和模拟器上正常工作,但在 facebook 上。每当我将带有附件的消息发送到 Facebook 时,我都会收到以下错误。
SendActivityToUserAsync FAILED:
{
"error": {
"message": "(#100) Web url cannot be empty for url type button",
"type": "OAuthException",
"code": 100,
"error_subcode": 2018041,
"fbtrace_id": "C0s4Cxs3g+s"
}
}
操作返回了无效的状态代码“BadRequest”
//附件代码。
var heroCard = new HeroCard
{
// title of the card
Title = "",
//subtitle of the card
Subtitle = "",
// list of buttons
Buttons = new List<CardAction> {
new CardAction() {
Title = "Show my calendar",
Text = "Show my calendar",
Type = ActionTypes.ImBack
},
new CardAction() {
Title = "Show my day",
Text = "Show my day",
Type = ActionTypes.ImBack
}
}
};
【问题讨论】:
标签: botframework facebook-messenger facebook-messenger-bot