我有一个聊天机器人,过去可以正常工作,但上周,它停止回答一些与之交互的人,而有些人继续正常工作。两天后,它回过头来回答所有的客户,但只提供卡片列表(没有文字、回发选项、图像......等)。我没有更改请求并使用仍未弃用的 facebook API 2.10 版。那么facebook系统现在有问题还是他们的API有变化?因为我正在检查文档,我看到的所有重大更改都具有来自 FB 的关于“messaging_type”参数的默认值。另外,我认为问题在于 id 和令牌(例如 PSID 是错误的,但是它如何用卡片回复)?
这是一个停止工作的请求的示例(该机器人几个月以来一直是相同的并且一直在工作:请求:
{
"message": {
"text": "To change the language to english, please type 'En'"
},
"recipient": {
"id": "ClientRecipientPSID"
}
}
响应(400 错误请求):
{
"error": {
"message": "(#2022) Your account is temporarily unavailable. Regain access by logging in from a mobile or web browser.",
"type": "OAuthException",
"code": 2022,
"fbtrace_id": "BeDypKgHKH2"
}
}
注意:我已经登录和退出了很多次,并且客户帐户处于活动状态,但没有任何变化。
虽然这是一个有效的 reuest 示例(仅卡列表):
{
"message": {
"attachment": {
"type": "template",
"payload": {
"elements": [{
"title": "ZZZ",
"subtitle": "Hello John I’m ZZZ Bot. Ask me anything and I'll be glad to help you.",
"buttons": [{
"type": "postback",
"title": "Title1",
"payload": "1"
}, {
"type": "postback",
"title": "Title2",
"payload": "2"
}, {
"type": "web_url",
"url": "client_url",
"title": "Title3"
}],
"image_url": "our_img_url",
"default_action": {
"type": "web_url",
"url": "link_to_client_site",
"webview_height_ratio": "tall",
"fallback_url": "link_to_client_site",
"messenger_extensions": true
}
}, {
"title": "ZZZ",
"subtitle": "Click below for more information:",
"buttons": [{
"type": "postback",
"title": "TitleX",
"payload": "371"
}, {
"type": "postback",
"title": "TitleY",
"payload": "372"
}, {
"type": "postback",
"title": "TitleZ",
"payload": "373"
}],
"image_url": "our_img_url",
"default_action": {
"type": "web_url",
"url": "link_to_client_site",
"webview_height_ratio": "tall",
"fallback_url": "link_to_client_site",
"messenger_extensions": true
}
}],
"template_type": "generic"
}
}
},
"recipient": {
"id": "ClientRecipientPSID"
}
}
知道为什么会这样吗?谢谢。