Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facebook Messenger Node.js Chatbot

An example Facebook Messenger node.js chatbot integrated with Dialog Analytics. Built with expressjs/express.

Getting started

Clone this repository and run npm install

Create an account on https://app.dialoganalytics.com, grab your Dialog API token and bot ID.

Set environment variables in .env:

FACEBOOK_PAGE_ACCESS_TOKEN=...
FACEBOOK_VERIFY_TOKEN=...
DIALOG_API_TOKEN=...
DIALOG_BOT_ID=...

Get your Facebook Messenger tokens at https://developers.facebook.com. Configure your application's webhook settings in the Facebook developer dashboard to the endpoint on which this server will be listening.

Local development: When developping locally, use a service like https://ngrok.com to expose a server running on your machine. This should be something like https://f562681e.ngrok.io/webhook

$ ngrok http 3000

Start the bot:

$ npm start

Open the Messenger application, find your bot and exchange a few messages. Messages will be sent to Dialog's API.

Go further

Read more on how to make the most out of the possibilities offered by Dialog here: https://dialoganalytics.com

About

An example Facebook Messenger Node.js chatbot integrated with Dialog Analytics

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages