Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: What do you use for Django integration with Facebook
8 points by sid6376 on Oct 3, 2011 | hide | past | favorite | 8 comments


Django-facebook is the only one I know of that will support the Graph API right now: https://github.com/tschellenbach/Django-facebook

For just the fundaments:

Facebook's own SDK: https://github.com/facebook/python-sdk/blob/master/examples/...

or

Requests: http://docs.python-requests.org/en/latest/index.html

If you need more providers, there's also Django SocialAuth, but I'm not sure if it's updated for Facebook's OAuth 2 stuff yet.


Also, rather important note, if you are using (or see another library using) python-oauth2, note that that is _not_ providing OAuth 2.0 draft support.

It implements OAuth version 1.0 (check the source: https://github.com/simplegeo/python-oauth2/blob/master/oauth... and search for "Blaine")


I started using django-social-auth, but ended up rolling my own Facebook backend using the Facebook Python SDK. It's really simple if all you want to do is fetch some information and create a new user.

That said, django-social-auth should be more than enough if all you need is a way for a user to login using Facebook Connect.


I like django-allauth a lot for all the social authentication integration: https://github.com/pennersr/django-allauth



I just write a little graph_fetch function, attach it to whatever model will hold the user's facebook_id and token, and that's pretty much it.



django-social-auth is the best for doing Facebook authentication/account-creation.

I don't deal with the Graph API much so I can't comment on that aspect.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: