Closed joshlsullivan closed 7 years ago
I am following the example:
import requests
user = User.objects.get(...) social = user.social_auth.get(provider='google-oauth2') response = requests.get( 'https://www.googleapis.com/plus/v1/people/me/people/visible', params={'access_token': social.extra_data['access_token']} ) friends = response.json()['items']
found here. I get the error AttributeError: 'QuerySet' object has no attribute 'social_auth'. Any ideas?
AttributeError: 'QuerySet' object has no attribute 'social_auth'
Ensure that the user is indeed a user instance and not a queryset.
user
I am following the example:
import requests
user = User.objects.get(...) social = user.social_auth.get(provider='google-oauth2') response = requests.get( 'https://www.googleapis.com/plus/v1/people/me/people/visible', params={'access_token': social.extra_data['access_token']} ) friends = response.json()['items']
found here. I get the error
AttributeError: 'QuerySet' object has no attribute 'social_auth'
. Any ideas?