Messenger-Bot is a chatbot for facebook messenger created with Node.js
Clone the project and install the dependencies with :
npm install
- Node.js - Open-source, cross-platform JavaScript run-time environment that executes JavaScript code server-side
- npm - Package manager for the JavaScript programming language
- Heroku - Cloud platform to deploy your project
Deploy your app using terminal:
git init
git add .
git commit -m "Fisrt commit"
heroku create
git push heroku master
1 - Install all dependencies :
npm install
2 - Go to Facebook for Developers and Add New App
3 - Set up Messenger
4 - Token Generation : select your facebook page and copy token generated and paste it in index.js
let token = "<YOUR_FACEBOOK_PAGE_TOKEN>"
5 - Setup Webhooks :
- Callback URL : your heroku app link where you deployed your ChatBot app
- Verify Token : enter your custom token and make sure is the same in index.js
<YOUR_VERIFY_TOKEN>
- Subscription Fields, select :
messages
messaging_postbacks
messaging_optins
message_deliveries
Then Verify and Save
6 - Change the app Status from 'In Development' to 'Live'
Send any message to your facebook page where you set your chatbot and enjoy talking to your robot.
In this app I used only Postback Button and Generic Template, you can customize the Bot's answears using Facebook Send API
- Abdelkader EL YAZIDI - Front-End developer - Abdelyaz