2

I have added scopes to each provider but I do not receive all the additional data in extra_data. I only receive the default extra data. When using oauth facebook does ask to I will allow the data to be used but I do not recieve the data such as user_likes, user_activites. Same with google, and instagram. The spotify provider is a custom provider.

SOCIALACCOUNT_PROVIDERS = \
    {
    'facebook':
        {'SCOPE': ['email', 'public_profile', 'user_activities', 'user_likes',
'user_interests', 'publish_stream', 'user_friends'],
             'AUTH_PARAMS': {'auth_type': 'reauthenticate'},
             'METHOD': 'js_sdk'},

    'google':
        {'SCOPE': ['https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email',
                   'https://www.googleapis.com/auth/youtube.readonly']
            , 'AUTH_PARAMS': {}},
    'instagram':
        {'SCOPE': ['basic']
            , 'AUTH_PARAMS': {}},
    'spotify':
        {'SCOPE': ['playlist-modify-public', 'user-follow-read', 'user-read-email']
            , 'AUTH_PARAMS': {}},

    }

1 Answers1

2

This is probably a bit too late, but I had the same problem fetching additional data from Facebook using django-allauth.

The solution was to simply list the fields you want.

SOCIALACCOUNT_PROVIDERS = \
{
'facebook':
    {'SCOPE': ['email', 'public_profile', 'user_activities', 'user_likes','user_interests', 'publish_stream', 'user_friends'],
         'AUTH_PARAMS': {'auth_type': 'reauthenticate'},
         'METHOD': 'js_sdk',
         'FIELDS': [
        'id',
        'email',
        'name',
        'first_name',
        'last_name',
        'likes',      #This is the one you want
        'friends',
        # user_interests is deprecated
    ],},

# other providers

}

The same probably applies to all the others too. I cannot say as I haven't used any others yet.

Resley Rodrigues
  • 2,218
  • 17
  • 17