A ready-to-go template to create your own Facebook Messenger bot using the Ebony Framework and the Ebony Messenger Adapter.
After you click on Use this template, you can clone the resulting repo and build your own bot.
- You'll need a server with SSL setted up to host your bot. An easy and tested choice is Heroku. Alternatively, for local development, you can use Ngrok.
- You'll need a Messenger Platform Facebook app. You can learn how to set up your Messenger Platform Facebook app and the basics around it, at the official Facebook Developers Messenger Platform tutorial (up to step 4).
-
Get the necessary environment variables (if you do local development you can either load them through the command line, or create a
.env
file and use dotenv to load it into the./lib/secret.ts
file). You'll need the following variables:a. FB_APP_SECRET:
Access your app in developers.facebook.com
Settings → Basic → App Secret.
b. FB_PAGE_TOKEN:
Access your app in developers.facebook.com
Messenger → Settings → Page Access Token
c. FB_PAGE_ID:
Access your page in facebook.com
About → Scroll Down – Page Id
d. MONGODB_URI:
Connection URI for your MongoDB database (if you use Heroku, it will be automatically setted up).
-
If you use Heroku, just push your code to your Heroku app. In any other case, just hit
npm install
,npm run build
,npm start
.
- Christos Panagiotakopoulos - Initial Work
This project is licensed under the MIT License - see the LICENSE file for details.