Skip to main content


Project description

facebook-javascript-authentication is a Django application that manages user authentication via Facebook using the JavaScript Facebook SDK and django-facebook-auth application ( )



facebook-javascript-authentication can be installed as a normal Python package.

Example instalation for pip:

$ pip install facebook-javascript-authentication


Set USE_TZ = True

Add facebook_javascript_authentication to INSTALLED_APPS:


Add javascript authentications urls to application urls:

urlpatterns = patterns('',
    url(r'^facebook_javascript_authentication/', include('facebook_javascript_authentication.urls')),

Add script.js in html template head:

<script type="text/javascript" src="{{ STATIC_URL }}facebook_javascript_authentication/script.js"></script>

Add updating isAuthenticated variable on facebook user status change to FB.init block:

{% load facebook_javascript_sdk %}
{% fb_init_block %}
{% endblock %}



To show user login dialog with email permissions:

loginDialog(successCallback, 'email')

isAuthenticated variable

Variable isAuthenticated is set to current user status on each facebook ‘auth.statusChange’ event.

Custom login source

If you have a user access token then you can try authenticate him by calling:

login(access_token, successCallbackFunction)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for facebook-javascript-authentication, version 3.2.1
Filename, size File type Python version Upload date Hashes
Filename, size facebook-javascript-authentication-3.2.1.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page