This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
Facebook integration for your Django website

Simply add ``django_facebook`` to your INSTALLED_APPS and configure
the following settings:


# Optionally set default permissions to request, e.g: ['email', 'user_about_me']

# And for local debugging, use one of the debug middlewares and set:

A few helpers for using the Javascript SDK can be enabled by adding
this to your base template in the ``<head>`` section:

{% load facebook %}
{% facebook_init %}
{% block facebook_code %}{% endblock %}
{% endfacebook %}

And this should be added just before your ``</html>`` tag:

{% facebook_load %}

The ``facebook_load`` template tag inserts the code required to
asynchronously load the facebook javascript SDK. The ``facebook_init``
tag calls ``FB.init`` with your configured application settings. It is
best to put your facebook related javascript into the ``facebook_code``
region so that it can be called by the asynchronous handler.

You may find the ``facebook_perms`` tag useful, which takes the setting
in FACEBOOK_PERMS and prints the extended permissions out in a
comma-separated list.

<fb:login-button show-faces="false" width="200" max-rows="1"
perms="{% facebook_perms %}"></fb:login-button>

A helpful debugging page to view the status of your facebook login can
be enabled by adding this to your url configuration:

(r'^facebook_debug/', direct_to_template, {'template':'facebook_debug.html'}),

Once this is in place you are ready to start with the facebook javascript SDK!

This module also provides all of the tools necessary for working with facebook
on the backend:

This provides seamless access to the Facebook Graph via request object.

If a user accesses your site with:
- a valid cookie (Javascript SDK), or
- a valid ``signed_request`` parameter (Facebook Canvas App),
then your views will have access to request.facebook.graph and you can
begin querying the graph immediately. For example, to get the users friends:

def friends(request):
if request.facebook:
friends = request.facebook.graph.get_connections('me', 'friends')

To use the middleware, simply add this to your MIDDLEWARE_CLASSES:

``FacebookDebugCookieMiddleware`` allows you to set a cookie in your settings
file and use this to simulate facebook logins offline.

``FacebookDebugTokenMiddleware`` allows you to set a uid and access_token to
force facebook graph availability.

``FacebookDebugCanvasMiddleware`` allows you to set a signed_request to mimic
a page being loaded as a canvas inside Facebook.

This provides seamless integration with the Django user system.

If a user accesses your site with a valid facebook cookie, a user
account is automatically created or retrieved based on the facebook UID.

To use the backend, add this to your AUTHENTICATION_BACKENDS:

To automatically populate your User and Profile models with facebook data, use:

Don't forget to include the default backend if you want to use standard
logins for users as well:

``@facebook_required`` is a decorator which ensures the user is currently
logged in with facebook and has access to the facebook graph. It is a replacement
for ``@login_required`` if you are not using the facebook authentication backend.

``@canvas_only`` is a decorater to ensure the view is being loaded with
a valid ``signed_request`` via Facebook Canvas. If signed_request is not found, the
decorator will return a HTTP 400. If signed_request is found but the user has not
authorised, the decorator will redirect the user to authorise.
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django4facebook-0.1.0.tar.gz (7.0 kB) Copy SHA256 Checksum SHA256 Source Jun 23, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting