Search code examples
pythondjangofacebookuser-registration

How can I add a facebook user login functionality


My python version is 3.4.3 and my django version is 1.9.6 . I tried many django facebook registrations apps but almost all the versions are outdated.

What I want is to allow users to login via facebook and check if their friends are registered to my website. Your help would be very much appreciated!


Solution

  • There's a package for Django third party auth that is well maintained, Django-allauth:

    https://readthedocs.org/projects/django-allauth/

    I use it for Facebook, Twitter and Google auth methods.

    There is also a good step by step tutorial:

    http://www.sarahhagstrom.com/2013/09/the-missing-django-allauth-tutorial/

    The tutorial walks through Facebook as an example. It is slightly out of date but still works. Facebook has tweaked their interface since it was written. Good luck!