Permalink
Browse files

update provdiers/vk.py with merged in changes

  • Loading branch information...
1 parent c2582a5 commit 36f5790c8fb6d4d9a5120d099419ba30fd73e897 @eriktaubeneck eriktaubeneck committed Jul 10, 2014
Showing with 10 additions and 3 deletions.
  1. +10 −3 flask_social/providers/vk.py
@@ -22,7 +22,6 @@
'request_token_url': None,
'access_token_url': 'https://oauth.vk.com/access_token',
'authorize_url': 'https://oauth.vk.com/authorize',
- 'request_token_params': {}
}
@@ -42,7 +41,7 @@ def get_connection_values(response, **kwargs):
return None
access_token = response['access_token']
- vk = vkontakte.API(token=response['access_token'])
+ vk = vkontakte.API(token=access_token)
profile = vk.getProfiles(
uids=response['user_id'],
fields='first_name,last_name,photo_100,screen_name')[0]
@@ -57,5 +56,13 @@ def get_connection_values(response, **kwargs):
display_name=profile.get('screen_name', fullname),
full_name=fullname,
profile_url=profile_url,
- image_url=profile.get('photo_100')
+ image_url=profile.get('photo_100'),
+ email='',
+ )
+
+
+def get_token_pair_from_response(response):
+ return dict(
+ access_token=response.get('access_token', None),
+ secret=None,
)

0 comments on commit 36f5790

Please sign in to comment.