-
Git clone this repository
-
npm install
-
create a new facebook app at https://developers.facebook.com
-
Add messenger and Webhooks as products
-
Create a Facebook page
-
Use ngrok (https://ngrok.com/) to listen to a port (e.g., if your port is 3000) with the command
ngrok http 3000
-
ngrok
generates a https URL for you (e.g., https://c746b166.ngrok.io) -
Fill in the callback url in the Facebook App as
https://c746b166.ngrok.io/webhook
-
Subscribe to the bot on Facebook App
-
Change the token, app secret and verify token in the config folder in this repository