Home How do I retrieve informations from my facebook user token using python in a django web app?
Reply: 0

How do I retrieve informations from my facebook user token using python in a django web app?

user1152
1#
user1152 Published in April 26, 2018, 9:35 am

I just created a web application using django. It has a login page where a user can login using facebook or twitter or github and I did that using django_social_auth2. In my settings.py, I added the required authentication backends:

AUTHENTICATION_BACKENDS = (
'social_core.backends.github.GithubOAuth2',
'social_core.backends.twitter.TwitterOAuth',
'social_core.backends.facebook.FacebookOAuth2',
'django.contrib.auth.backends.ModelBackend',)

added social_django in my installed apps and ask for the following informations:

SOCIAL_AUTH_FACEBOOK_SCOPE = [
'email',
'user_posts',
'user_location',]

A user who wants to login, gets the following message:

And in the admin page, I get a token with the granted informations.

Now, what I want to do is extract the user's informations without having to paste the token in the facebook graph API explorer. How can I do this in python and integrate it in my Django app ?

I have read the documentation regarding the granted informations and the users will only be me and my teaching assistant. Thanks

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.306901 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO