A Facebook messenger bot that uses Full Stack to test responses and interactions with users.
Account Setup
- Create an Optimizely Full Stack project
- Access a Facebook Developer account, and create a new app for Messenger
- Create a Verify Token for authentication with Facebook (select messages & messaging_postbacks for your Subscription fields)
Developer Setup
- Clone the repo
- Run
npm install - Create a .env file
touch .env - Enter your Optimizely Full Stack project in the .env file as
PROJECT_ID={your project id} - Enter your Facebook API token in the .env file as
FACEBOOK_TOKEN={your token} - Enter your verify token in the .env file as
VERIFY_TOKEN={your token} - To start the app after setup,
npm start
Note: You will also need to have a publicly accessible url to receive POSTs from Facebook for authentication and to receive incoming messages. One recommended approach to do this locally is to use Ngrok or deploy the sample app to Heroku