python - Getting information about the user from Facebook using django_facebook -


first of apologize community if repost. searching stackoverflow might me on matter search ended no success. here comes problem.

maybe it's lack of skills, couldn't quite figure way out through django_facebook documentation. went through whole thing , though think of pieces explained well, creating big picture pretty hard me...

i managed connect django_facebook app on facebook , login, couldn't pull information user logged in. goal allow users login/register facebook on website, , pull basic information facebook can suggest them user information profile on website.

i thankful, if can explain whole login/register , getting informations user process thoroughly.

p.s. suggested django_allauth me. should switch that? if yes, pros&cons of both djang_facebook , django_allauth? p.p.s. wasn't able find decent tutorial django_facebook nor django_allauth. if have any, please gimme links :)

here tutorial explaining how use all_auth social authentication. can access data allauth object directly, using code snippet following in view:

first, information account using:

account_uid = socialaccount.objects.filter(user_id=request.user.id, provider='facebook') 

then, using member attributes given below, can parameters have been made public.

account_uid[0].get_avatar_url() account_uid[0].extra_data['username'] account_uid[0].extra_data['first_name'] account_uid[0].extra_data['last_name'] account_uid[0].extra_data['gender'] account_uid[0].extra_data['email'] account_uid[0].extra_data['link'] account_uid[0].extra_data['uid'] 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -