Facebook Connect - Django integration on filmaster.com
Integrating Facebook users with external website using Facebook Connect and Django
Facebook allows developers to integrate Facebook accounts with their sites using Facebook Connect. User see a Facebook button on a site, he click/logs in on that site and the button sets Facebook cookies on it. I've made such integration for Filmaster.com -- film buffs community. In this solution users are registered/logged in automatically. There are also other solutions: fbconnect or a middleware.
The base of this integration is a middleware that checks for FB cookies (and if they are good), and then gets the user ID and try to login existing user if it has assigned Django account, or makes a new one. The FB Connect will set cookie name as you Facebook Connect API key (and few KEY_* cookies, like KEY_user with the user id).