👩‍💻Using Source Code

Deploy to Glitch#

  1. Click 'Remix' button bellow

Remix on Glitch

  1. Set Variables in .env files
  2. Put your glitch app url in your facebook app developer, e.g. https://hayword.glitch.me/webhook

Testing in localhost & Deploy with Ngrok#

  1. Download final-code.zip here
  2. Unzip final-code.zip and open final-code folder
  3. Create .env file that contain :
    PAGE_ACCESS_TOKEN=<YOUR_PAGE_ACCESS_TOKEN>
    VERIFY_TOKEN=<YOUR_VERIFY_TOKEN>
    API_KEY=<YOUR_API_KEY>
    AUTH_DOMAIN=<YOUR_AUTH_DOMAIN>
    PROJECT_ID=<YOUR_PROJECT_ID>
    APP_ID=<YOUR_APP_ID>
    RAPID_API_KEY=<YOUR_RAPID_API_KEY>
    to getting the value from .env variables, you can read the tutorial.
  4. run npm install or yarn add in terminal
  5. run npm start in terminal
  6. Download and Install Ngrok here.
  7. run ngrok ngrok http 1337 in terminal, after that you will get ngrok url e.g https://5f54c02d532f.ngrok.io
  8. Put ngrok url+/webhook that you get to webhook url in facebook app developer e.g https://5f54c02d532f.ngrok.io/webhook