Fandjango is best installed with pip:
$ pip install fandjango
In your ``settings`` module...
Add fandjango to INSTALLED_APPS
Add fandjango.middleware.FacebookMiddleware to MIDDLEWARE_CLASSES
Add url(r'^fandjango/', include('fandjango.urls')) to your patterns.
Specify your Facebook application’s id, secret key and namespace:
FACEBOOK_APPLICATION_ID = '...'
FACEBOOK_APPLICATION_SECRET_KEY = '...'
FACEBOOK_APPLICATION_NAMESPACE = '...'
Note
If you’re using Django’s CSRF protection middleware, you need to make sure Fandjango’s middleware precedes it. Otherwise, Facebook’s requests to your application will qualify as cross-site request forgeries.
Finally, synchronize your database:
$ python manage.py syncdb
Note
If you’re using South, run schema migrations instead.
In order to install and use Fandjango, you will need five primary pieces of software:
If you are interested in contributing to Fandjango, you will also need to install some or all of the following packages:
For an up-to-date list of exact testing/development requirements, including version numbers, please see the DEPENDENCIES file included with the source distribution. This file is intended to be used with pip, e.g. pip install -r DEPENDENCIES.
You may have to change your database schema when you upgrade Fandjango. Thankfully, Fandjango bundles South migrations and so upgrading your database is as simple as running python manage.py migrate fandjango.
If you’re not using South, you’re on your own.
To follow Fandjango’s development via Git instead of downloading official releases, please see our Github mirror.