Based on the original SDK published https://github.com/facebook/python-sdk
- In settings.py add ‘facebook’ to your INSTALLED_APPS
- In settings.py add:
AUTHENTICATION_BACKENDS = (‘facebook.auth.backends.FacebookBackend’,) - In settings.py add (from www.facebook.com/developers/):
FACEBOOK_APP_ID = ‘’
FACEBOOK_APP_SECRET = ’’ - In your urls.py add:
url(r’^accounts/‘, include(’facebook.auth.urls’)) - You might want to take a look at facebook/auth/views.py and change the ‘scope’ parameter according to the permissions your application needs (http://developers.facebook.com/docs/authentication/permissions)
- Currently the code is built for Google App Engine depending only on urlfetch This is needed in order to pass the ‘deadline’ parameter to avoid timeout issues with Facebook API. However this could be easily changed to use urllib.open()