[Answer]-Django-facebook. How to use a user's profile from other apps(not django-facebook)

1👍

Use this godjango.com video:

https://godjango.com/13-django-social-auth-101/

It will give you a walk through of how to create social logins using OAuth. It uses GitHub in the video example. Within the django-social-auth package, you can find out how to install and use it here:

http://django-social-auth.readthedocs.org/en/latest/installing.html

For Facebook you need to look in the documentation or the package itself for the name of the access token. I will give it to you here just in case though. They are:

FACEBOOK_APP_ID and FACEBOOK_API_SECRET

In your settings.py you can set them up as so using environmental variables:

FACEBOOK_APP_ID = os.environ['FACEBOOK_APP_ID']
FACEBOOK_API_SECRET = os.environ['FACEBOOK_API_SECRET']

You need to get the actual APP_ID and API_SECRET through your Facebook account. You will want to use the developer Facebook site to create an App and then generate the API credentials. The web address for this is:

https://developers.facebook.com

Hope this helps. Put these together and you will have social logins for your web app.

Leave a comment