-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
John Mark Gabriel Caguicla edited this page Jan 13, 2019
·
3 revisions
- Go to developers.facebook.com, create a new app and add the Messenger platform.
- From the app dashboard, go to Basic Settings and grab your App Secret key. From the Messenger Settings page, select the page you want to run on and grab your Page Access Token.
- Clone this repository and do
npm start
on your host, make sure to set appropriate values for APP_SECRET, APP_PAGE_TOKEN and APP_VERIFY_TOKEN (Facebook asks for this when setting up the webhook, can be any string) as environment variables. - Make sure to set up the database tables using the provided schema dump.
- On your Facebook app page go to the Messenger Settings page and set-up your webhook (the webhook is being served on /webhook by default). Make sure to select the page you will be using and subscribe it to the webhook.
These are read from process.env
so either specify them as environment variables when launching the server or use something like dotenv
to load them into process.env
.
- MODULE_BLACKLIST - Comma separated list of modules to ignore
- COMMAND_PREFIX - All messages beginning with this are interpreted as commands, defaults to
!
if not specified - APP_PAGE_TOKEN - Facebook Page Access Token
- APP_SECRET - Facebook App Secret
- APP_VERIFY_TOKEN - Arbitrary passphrase used when connecting the webhook to Facebook
- DATABASE_URL - URL to a PostgreSQL server (
postgres://username:password@host[:port]/database
) - DIALOGFLOW_TOKEN - DialogFlow API Token
- GELBOORU_KEY - Gelbooru API Key
- GELBOORU_USERID - Gelbooru User ID
- GOOGLE_CX - Google CSE Search engine ID
- GOOGLE_KEY - Google CSE API Key
- OPENWEATHERMAP_KEY - OpenWeatherMap API Key
- YANDEX_TRANSLATE_KEY - Yandex.Translate API Key