Facebook Messenger Bot验证

atm*_*ish 35 facebook facebook-graph-api facebook-messages facebook-messenger

我提交了我的facebook messenger机器人进行应用程序审查,拒绝原因是" 没有得到回复 ".

我已经从我自己的帐户和我添加到我的Facebook应用程序中进行测试的其他测试人员测试了我的机器人.但是,当我尝试使用默认测试时,我Open Graph Test User没有得到任何响应.发送消息API失败,错误:

{"error": {"message":"(#100) No matching user found", "type":"OAuthException", ...}}
Run Code Online (Sandbox Code Playgroud)

我在这做错了什么?如何使用发送/接收消息API向测试用户发送消息?

Mat*_*nnt 15

我遇到了同样的问题,并在facebook开发者社区得到了回复.好像是确认错误:https: //developers.facebook.com/bugs/230322797329131/?hc_location = ufi

更新:现在似乎有效.从本周二开始,我可以看到评论者向机器人发送消息并在页面消息中获得响应.


Grv*_*agi 6

我的问题是

我在我的json数据中发送收件人ID 而不是 发件人ID.

dict_to_send = {
   'message': {'text': u'hello FB'},
   'recipient': {'id': **'*sender_id_here*'**}
}
res = requests.post("https://graph.facebook.com/v2.6/me/messages?access_token=your_token_here", <br>data=json.dumps(dict_to_send), headers = {'content-type':'application/json'})
Run Code Online (Sandbox Code Playgroud)

  • 还有我的问题.我认为facebook demo app使用的是recipient.id而不是sender.id (3认同)