In this guide, you will learn how to setup a fully functional Facebook Messenger Chatbot that can be tested in real-time locally. The bot in this guide is coded using JavaScript.
All the files you will need are available above: index.js, package.json, and .gitignore
These files are intended to be used as a framework for your own project by simplifying coding for the bot to if...else statements that are easily modified. More specific instructions are in the files.
For the full setup instructions see THE BEST CHATBOT GUIDE. Then read below for debugging.
Follow these steps to update your bot as you change your code.
Through terminal and in your bot's folder, execute the following code:
$ git add .
$ git commit -m “message about what you’re changing”
$ git push heroku master
After that, message your bot and the changes should be updated :)
For advanced debugging: go to your Heroku account, select the server your bot is on, click "More", and finally select "View Logs".
- Jay Syz