facebook-javascript-authentication is a Django application that manages user authentication via Facebook using the JavaScript Facebook SDK and django-facebook-auth application ( https://github.com/pozytywnie/django-facebook-auth )
Installation
Package
facebook-javascript-authentication can be installed as a normal Python package.
Example instalation for pip:
$ pip install facebook-javascript-authentication
Configuration
settings.py
Set USE_TZ = True
Add facebook_javascript_authentication to INSTALLED_APPS:
INSTALLED_APPS = (
...
'facebook_javascript_authentication',
...
)
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 %}
...
updateIsAuthenticatedOnFBStatusChanged();
...
{% endblock %}
Usage
loginDialog
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)
Metadata
Release files for facebook-javascript-authentication 3.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| facebook-javascript-authentication-3.2.1.tar.gz | 3.8 kB | Without provenance | Details |
Release files / facebook-javascript-authentication-3.2.1.tar.gz
| Download URL | facebook-javascript-authentication-3.2.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d48e7020c66fdc5c35e51ec87fd3d47dbb5f7df96e475857344e8cc87825f095
|
|
BLAKE2b-256 checksum How to use checksums |
d1ed45413115fc4d633bbe5c171df3e2e99891d7591410c5a73a6e86055fcbfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for facebook-javascript-authentication 3.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.