Code for my Tutorial on building a Facebook Messenger bot using Django/Python
Branch: master
Clone or download
abhay1 Merge pull request #7 from acjh/patch-1
Fix path to in
Latest commit d3d4f2c Dec 15, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
yomamabot Fixed python3 incompatible lines of code May 10, 2016
.gitignore Initial Commit May 5, 2016
LICENSE Initial commit May 5, 2016 Fix path to Sep 12, 2017
requirements.txt Initial Commit May 5, 2016

Facebook Messenger Bot tutorial using Django/Python

This has the starter code for the tutorial I wrote on my Blog.

Tutorial: How to build a Facebook Messenger bot using Django, Ngrok

How to use

Run the following commands. You will need Python 2.7+/3.3+ and have Virtual Environment Wrapper setup.

git clone
cd django-facebook-messenger-bot-tutorial
mkvirtualenv bottutorial
pip install -r requirements.txt
cd yomamabot
python runserver

Follow the tutorial to setup Ngrok. Edit the VERIFY_TOKEN variable in django-facebook-messenger-bot-tutorial/yomamabot/fb_yomamabot/ to include the Verify token. It is set to 2318934571 as default that is used in the tutorial. This can be any token as long as it matches the one you tell Facebook.

Once you have your webhook setup, get your Page Access Token. Then set the PAGE_ACCESS_TOKEN variable in the file django-facebook-messenger-bot-tutorial/yomamabot/fb_yomamabot/ to your page access token.