调试/测试facebook messenger机器人 [英] Debugging/testing facebook messenger bot

查看:240
本文介绍了调试/测试facebook messenger机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了测试目的,我通常会把一些日志或调试器放在我的代码中,大概就像每个人一样。为了测试我的机器人,我想做同样的事情,但是甚至有一种方法来测试/调试本地的信使机器人,还是总是要部署我的测试?

For testing purposes I usually put some logs or debugger into my code, probably as everybody does. To test my bot I would like to do the same but is there even a way to test/debug the messenger bot locally, or do I always have to deploy my tests?

推荐答案

只需使用用于测试的url填写webhook url。您可以向bot发送一些内容,而bot可以收到消息(如果您是应用程序的管理员)。您可以从收到的邮件中获取 sender_id ,您可以使用sender_id作为收件人,并向收件人发送邮件。在此步骤中,您可以单独发送POST请求进行测试。完成上述所有测试后,删除调试部分,现在是时候去应用程序审阅!

Just fill the webhook url with the url that you use for testing. You can send something to bot, and bot can receive the messages(if you are the administrator of the app). from the received messages you could get your sender_id, you can use the sender_id as the recipient and let bot send messages to the recipient. In this step you can just send a POST request independently for testing. After finishing all the testing above, remove the debugging part, it's time to go to app review!

这篇关于调试/测试facebook messenger机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆