简体   繁体   English

Getting Operation 在 Bot Framework 上向 Facebook Azure 通道返回了无效状态代码“BadRequest”错误

[英]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}

Here is the document to connect to Facebook Channel.这是连接到 Facebook 频道的文档 If your bot works in web chat but not fakebook channels here are the steps to troubleshoot.如果您的 bot 在 web 聊天但不是 fakebook 频道中工作,这里是故障排除的步骤

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Bot 在 MS Teams 中返回错误“操作返回了无效的状态代码‘BadRequest’” - Bot returning error "Operation returned an invalid status code 'BadRequest'" in MS Teams Azure 操作返回无效状态“冲突” - Azure Operation returned an invalid status 'Conflict' 操作返回无效状态代码“NotFound”DotNet Core - Operation returned an invalid status code 'NotFound' DotNet Core 主动消息传递操作返回无效状态代码“未授权” - Proactive messaging throwing Operation returned an invalid status code 'Unauthorized' 使用 Api 管理服务发布 Azure function 应用程序 -- 无法在 Azure 中更新您的 API(状态代码:BadRequest) - Publishing Azure function app with Api Management service -- Failed to update your API in Azure (Status code: BadRequest) Azure 机器人在 Web 测试聊天中出现错误:要继续运行此机器人,请修复机器人源代码 - Azure bot giving error in Web test chat: To continue to run this bot, please fix the bot source code 将此消息发送到您的机器人时出错:HTTP 状态代码 NotFound error in test in web chat - There was an error sending this message to your bot: HTTP status code NotFound error in test in web chat 在 Microsoft azure QnA Maker Bot Javascript 文件中出现错误“读取机器人文件时出错。请确保您具有有效的 botFilePath” - Getting Error "Error reading bot file. please ensure you have valid botFilePath" in Microsoft azure QnA Maker Bot Javascript file 使用 Azure CLI 发布在 Bot 框架 Composer 中创建的 Bot - Publish a Bot created in Bot framework Composer using Azure CLI 我们可以使用 Azure 机器人框架构建自动化机器人吗? - can we build automation bot with Azure bot framework?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM