Authentication through Facebook's Graph API. See
http://developers.facebook.com/docs/authentication/ http://developers.facebook.com/docs/authentication/permissions http://developers.facebook.com/docs/api http://github.com/facebook/python-sdk/blob/master/examples/oauth/facebookoauth.py
Define the facebook tokens in settings.py and replace <app_name> with the name of your app. You will probably want to modify the scope on the authorize link in the template, see the authentication permissions link.
This updates the user model every time the user logs in but I think that it is okay so the data is always correct. I have tested this but not rigorously. If there is a hole and everyone gets admin rights to your site don't say I didn't warn you :).
Comments are appreciated.
16 June 2010 Added missing imports. Cleaned up the template.
Shouts out to @obeattie and @whalesalad