[英]Getting Operation returned an invalid status code 'BadRequest' error on Bot Framework to Facebook Azure channel
I am getting below error while I am sending response back to my Facebook channel using Azure Bot service.当我使用 Azure Bot 服务将响应发送回我的 Facebook 频道时,出现以下错误。 I used bot framework 4.0我用的是bot framework 4.0
One or more errors occurred.发生一个或多个错误。 (Operation returned an invalid status code 'BadRequest' (操作返回无效状态代码“BadRequest”
I getting above error while calling below methods调用以下方法时出现上述错误
Task t = Task.Run(() => turnContext.SendActivityAsync(MessageFactory.Text("Hi hellow", "Hi hellow", InputHints.AcceptingInput), cancellationToken), cancellationToken);
t.Wait(cancellationToken);
await Task.CompletedTask;
and also并且
Task t = Task.Run(() => turnContext.SendActivityAsync(MessageFactory.Attachment(card?.ToAttachment(), ssml: ssml), cancellationToken), cancellationToken);
t.Wait(cancellationToken);
await Task.CompletedTask;
the card object have below values卡 object 具有以下值
{
"title":"",
"subtitle":"",
"text":"For the best experience you should log in to your My Choice account.",
"images":null,
"buttons":[
{
"type":"postBack",
"title":"Let's Get Started",
"image":null,
"text":"Let's get started",
"displayText":"Let's get started",
"value":"Let's get started",
"channelData":null,
"imageAltText":null
}
],
"tap":null } “点击”:null}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.