Get access_token from Django request

Given a user instance, you can get the token by doing this:

social = request.user.social_auth.get(provider='provider name')
social.extra_data['access_token']

Assuming Facebook provider:

social = request.user.social_auth.get(provider='facebook')
social.extra_data['access_token']
FollowFollow on FacebookFollow on Google+Email this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *