Ramblings

April 18, 2008

Neat little Facebook snippet for Django

Filed under: dev, django, facebook, python, snippet, tip — michaelangela @ 7:51 pm

You can use this to set up a Facebook User within you Django app. This of course uses the middleware which is optional as described here.

Django snippets: Little middleware that create a facebook user

  1. Install **PyFacebook** package.
  2. After make all steps in tutorial above, put this code in your app’s
    models.py module (you maybe prefer split it and put the middleware
    class in some other file).
  3. Put the FacebookUserMiddleware python-path in the
    MIDDLEWARE_CLASSES in your settings.py (after
    facebook.djangofb.FacebookMiddleware).
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: