Skip to content

A Facebook messenger bot that gives train information from Romanian Railways.

Notifications You must be signed in to change notification settings

alexmarginean16/Travelrr

Repository files navigation

🚂 Travelrr

A Facebook messenger bot that gives train information from Romanian Railways. A live version of the app can be accessed here (not yet available)

Please feel free to contribute to anything for example:

  • documentation
  • code
  • issues
  • templates
  • fixing bugs
  • suggestions

Requirements

Environment setup

  1. Clone the project

     git clone https://github.com/alexmarginean16/Travelrr.git
     cd Travelrr/
    
  2. Create a python virtual environment python3 -m venv venv

  3. Activate venv: . /venv/bin/Activate

  4. Install requirements pip install -r requirements.py

  5. Create a facebook page here.

  6. Access facebook developers and create a new app, add the messenger product.

  7. Go to Messenger > Settings, select your page and get your Page Access Token.

  8. Run your python application:

     export FB_PAGE_TOKEN='<<yourpagetoken>>'
     export FB_VERIFY_TOKEN='<<yourverifytoken>>'
     python app.py.
    

Where FB_PAGE_TOKEN is the access token you copied from facebook app, and FB_VERIFY_TOKEN could be whatever you want.

  1. Run ngrok on the same port as the python server (usually 5000) ./ngrok http 5000.
  2. On facebook developer website while in your app go to Messenger > Settings and click Add webhook. At the webhook URL paste the link ngrok created for the localhost tunnel, and the FB_VERIFY_TOKEN value you created before. Select every checkbox and click done.
  3. Down to "Select a page to subscribe your webhook to the page events" select your desired page and click "subscribe".

Done! 🎉

About

A Facebook messenger bot that gives train information from Romanian Railways.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages