Skip to content

SeanHayes/django-facebook-oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Django Application for integrating Facebook Graph api.

Authentication backend is created which can be used to authenticateai Facebook users using the
django plugabble authentication system.

Also, for every user a Django Auth user is created which can be used to give a login credentials
other then facebook to the users too. Hence both the auth mechanism can work hand in hand.


Requires:
python 2.5+
facebook.py (Facebook Python Graph API SDK) 
available with this distribution


setting.py

SESSION_COOKIE_DOMAIN = <your domain for cookies>

HOST = <full domain of application: ex "http://www.google.com">

INSTALLED_APPS += (
'django.contrib.auth',
'django.contrib.sessions',
)

FACEBOOK_API_KEY=
FACEBOOK_APP_ID=
FACEBOOK_SECRET_KEY=

FB_AUTH_REDIRECT = "<specify absolute url path where client will be redirect after succesfull login, default redirection is to '/'>"

AUTHENTICATION_BACKENDS =  ('django.contrib.auth.backends.ModelBackend','fb.auth.FbAuth')

FB_PERM = ["publish_stream","offline_access","user_location","user_birthday","email"]
(this settings is used to pull various fb extended permissions while authenticating with facebook oauth. please check.
http://developers.facebook.com/docs/authentication/permissions)


urls.py
add one url param:
(r'^fb/', include('fb.urls')),



site url for facebook app:
http://yourdomain.com/fb/fb-auth/

About

Django Application for integrating Facebook Graph api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages