Skip to content
Facebook open graph api implementation using the Django web framework in python
Pull request Compare This branch is 1129 commits behind tschellenbach:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Django Facebook by Thierry Schellenbach (

Login and registration functionality using the new facebook open graph api.

  • Actually creates user models and profiles
  • Robust facebook user data -> django account conversion

Required django apps

  • django.contrib.auth (Django core app, included)
  • django-registration
  • django-notify

Additional dependencies

  • python-cjson


Step 1 - Settings

Define the settings in django_facebook/ in your file.

Step 2 - Url config


url(r'^facebook/', include('django_facebook.urls')),

to your global file.

Step 3 - Ensure the FB JS api is available on all pages you want to login

Facebook JS API

Step 4 - Update your models

Create a profile model from FacebookProfileModel from django-facebook/

Add a post_save signal handler for django.contrib.auth.models.User like:

from django.contrib.auth.models import User def create_profile(sender, instance, created, **kwargs): if created == True: profile = YourProfileModel(user=instance) post_save.connect(create_profile, sender=User)

In assing your model name to AUTH_PROFILE_MODULE.

Step 5 - Template

See examples/connect.html.

For more details, see the Facebook docs.

Something went wrong with that request. Please try again.