Skip to content
Facebook open graph api implementation using the Django web framework in python
Branch: master
Clone or download
Latest commit fecbb5d Apr 16, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
debian Prepared changelog for build 46 Aug 26, 2011
django_facebook Removed newly invalidated scopes Apr 16, 2018
docs Removed newly invalidated scopes Apr 16, 2018
facebook_example Merge pull request #584 from adamchainz/ Jun 4, 2017
open_facebook Update Oct 20, 2017
.gitignore Fix compatibility May 29, 2015
AUTHORS added authors and changes files Jul 5, 2012
LICENSE.txt Signed-off-by: Thierry <> Nov 22, 2010 excluded example and docs from pip, do you think they should be inclu… Apr 21, 2011 Convert readthedocs links for their .org -> .io migration for hosted … Sep 24, 2016
Vagrantfile travis is now testing 1.5.3 Oct 14, 2013 pep8 Oct 14, 2013
requirements-dev.txt Got pytest working Apr 16, 2018
requirements.txt some general clean up Jun 6, 2016 renaming and cleanup Feb 19, 2013
setup.cfg Got pytest working Apr 16, 2018 some general clean up Jun 6, 2016

Django Facebook by Thierry Schellenbach (


Django and Facebook are both rapidly changing at the moment. Meanwhile, I'm caught up in a startup and don't have much spare time. The library needs a good round of testing against the latest python, django and facebook graph API. Contributions are strongly appreciated. Seriously, give github a try, fork and get started :)


  • django-facebook will be dropping support for django < 1.8 since django only supports versions 1.8 and above.

Demo & About

Django Facebook enables your users to easily register using the Facebook API. It converts the Facebook user data and creates regular User and Profile objects. This makes it easy to integrate with your existing Django application.

After registration Django Facebook gives you access to user's graph. Allowing for applications such as:

  • Open graph/ Timeline functionality
  • Seamless personalization
  • Inviting friends
  • Finding friends
  • Posting to a users profile

Updates and tutorials can be found on my blog mellowmorning


  • Access the Facebook API, from:
    • Your website (Using javascript OAuth)
    • Facebook canvas pages (For building facebook applications)
    • Mobile (Or any other flow giving you a valid access token)
  • Django User Registration (Convert Facebook user data into a user model)
  • Store likes, friends and user data locally.
  • Facebook FQL access
  • OAuth 2.0 compliant
  • Automated reauthentication (For expired tokens)
  • Includes Open Facebook (stable and tested Python client to the graph API)



Open Facebook API


Contributing and Running tests

Tests are run from within the example project. You can run them yourself as follows:

install from git

facebook_example/ test django_facebook


A vagrant development setup is included in the GIT repo. Assuming you have vagrant installed, simply type the following in your shell:

# First get a fresh Django-Facebook checkout
git clone django-facebook

# Go to the directory:
cd django-facebook

# Time to start Vagrant (grab a cup of coffee after this command, it'll take a while) :)
vagrant up; vagrant provision

# Finally done?
vagrant ssh
python runserver 0:8000

To have a working Django Facebook example up and running at For the facebook login to work simply map that ip to (Since Facebook checks the domain)

You can run the test suite by typing:

python test django_facebook
You can’t perform that action at this time.