

Ask HN: What do you use for Django integration with Facebook - sid6376


======
makuro
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/...](https://github.com/facebook/python-
sdk/blob/master/examples/oauth/facebookoauth.py)

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.

~~~
makuro
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...](https://github.com/simplegeo/python-
oauth2/blob/master/oauth2/__init__.py) and search for "Blaine")

------
dguaraglia
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.

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

------
emilepetrone
Social Registration - <https://github.com/flashingpumpkin/django-
socialregistration>

------
ericflo
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.

------
aljosamohorovic
<https://github.com/jgorset/fandjango>

------
kennethlove
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.

