An example Facebook Messenger node.js chatbot built with Botkit and integrated with Dialog Analytics.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.env.default
.gitignore
LICENSE
Readme.md
bot.js
package.json

Readme.md

Facebook Messenger Botkit Chatbot

An example Facebook Messenger node.js chatbot and integrated with Dialog Analytics. Built with howdyai/botkit.

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.

Follow these instructions to get started with a Messenger bot.

Set environment variables in .env:

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

Local development: When developping locally, use a service like https://ngrok.com to expose a server running on your machine. You'll need to update your Facebook app's webhook and set it to something like https://075301e2.ngrok.io/facebook/receive.

$ ngrok http 3000

Start the bot:

$ node bot.js https://075301e2.ngrok.io

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