Django Facebook Connect App Recommendation

前端 未结 6 1787
逝去的感伤
逝去的感伤 2021-01-30 21:39

I want to implement Facebook connect login for my Django site and I\'ve checked the already existing apps.

So far, I have found Django-Socialauth, django-socialregistrat

相关标签:
6条回答
  • 2021-01-30 22:00

    I wanted to implement a basic "Login using Facebook" functionality in my Django app. I didn't want to show the user a form to fill or have her choose a password. I preferred to make it seamless.

    Based on my requirements, django_facebook_oauth was the best app for me. It simply allows the user to login using facebook, and gets the user info my Facebook app requests from her (based on my Facebook Auth Dialog). It creates a new user in Django with the user's facebook email, a username and a blank password.

    I highly recommend it.

    0 讨论(0)
  • 2021-01-30 22:01

    Hi Take a look at fbconnect app that we (actually, Hernani, a guy on our team) put together for osqa (a clone of CNPROG).

    You will have to, probably, tinker a bit to adapt that to your needs. It does work with @login_required decorator and the standard django.contrib.auth system, but we do not use django-registration.

    Our app also works with openid and password login, but the openid part is tightly coupled with the Q&A component at present.

    We may separate it though some time in the future, if anyone might be interested in "anything-signin" django pluggable app or has something better already - pls let us know.

    0 讨论(0)
  • 2021-01-30 22:08

    Update (11/26/2013): I'm updating my recommendation. Since a sufficient amount of time has passed since I wrote this answer, I would recommend python-social-auth or django-allauth as the best tools for the job. They are active projects with good documentation and support for a lot more than just Facebook. I've had success using both.


    I have had the most luck with adapting django-socialregistration with django-registration (0.8). Since you're working with django-registration, you're going to have to do a little bit of work, since all three of those packages assume the role of both the creation and the authentication of the user.

    I was just going to explain what needed to be done, but you inspired me to finally get my version out: hello-social-registration.

    Like I alluded to, it separates gives the registration functions to a django-registration backend and handles all the authorization itself. I've been using this on my near-beta application for a while now with no problems (I also handed it to a friend to use a few months ago and he got it to work without much modification).

    It's definitely not ready to be a plug-and-play reusable application, yet, but hopefully it'll provide you with some insight. :)

    0 讨论(0)
  • 2021-01-30 22:16

    I've used django-allauth and django-facebook on two different projects.

    django-allauth was great and provided very good support for logging in and creating user profiles. It could also work with other auth providers, which I didn't implement.

    django-facebook worked out of the box, but it's only compatible with Facebook. It also provided simple APIs for fetching users' likes and friends from Facebook directly into the db, which I liked very much!

    facebook.get_and_store_likes(user)
    facebook.get_and_store_friends(user)
    
    0 讨论(0)
  • 2021-01-30 22:16

    I played with .NET based libraries and found them to be frustratingly out of date. Facebook seems to change their APIs frequently, so if you cannot find a library that is routinely maintained, you will find that you will get halfway through your implementation before you realize that there are serious problems.

    I had some success with the javascript API that Facebook publishes and maintains. While the documentation may not be always up to date, I found that I was always within striking distance of the correct implementation (one or two changes needed).

    0 讨论(0)
  • 2021-01-30 22:17

    By far the most commonly used package for Facebook authentication in Django is Django Facebook:

    https://github.com/tschellenbach/Django-facebook

    It also gives you access to the facebook APIs using the included Open Facebook api client.

    0 讨论(0)
提交回复
热议问题