Skip to content

tharindu-wj/facebook-messenger-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facebook Messenger Bot

Setup Facebook Messenger App

Follow this developer document [Documentation]https://developers.facebook.com/docs/messenger-platform/webhooks Note: make sure to enable Built-in NLP for the page

Setup App Locally

1. Install the dependencies

Open a new terminal tab in this directory.

$ npm install

2. Set up .env file

Copy the file .sample.env to .env

cp .sample.env .env

Edit the .env file to add all the values for your app and page.

3. Import data to DB

Create a collection called products and data.products.json to it

cp .sample.env .env

Edit the .env file to add all the values for your app and page.

3. Run your app locally

npm run dev

4. Install tunneling service

If not already installed, install ngrok via download or via command line:

npm install -g ngrok

In the directory of this repo, request a tunnel to your local server with your preferred port

ngrok http 5000

TODOS

  • Proper error handling middleware
  • Include some customer details in the purchase order email
  • Unit tests
  • Improve logging

About

Sample application for Facebook messenger bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published