omniauth-vkontakte 1.1.2 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Vkontakte
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
  end
@@ -41,7 +41,7 @@ module OmniAuth
41
41
  :image => raw_info['photo'],
42
42
  :location => location,
43
43
  :urls => {
44
- 'Vkontakte' => "http://vk.com/#{raw_info['domain']}"
44
+ 'Vkontakte' => "http://vk.com/#{raw_info['screen_name']}"
45
45
  }
46
46
  }
47
47
  end
@@ -52,15 +52,15 @@ module OmniAuth
52
52
 
53
53
  def raw_info
54
54
  # http://vk.com/developers.php?o=-17680044&p=Description+of+Fields+of+the+fields+Parameter
55
- fields = ['uid', 'first_name', 'last_name', 'nickname', 'sex', 'city', 'country', 'online', 'bdate', 'photo', 'photo_big', 'domain']
55
+ fields = ['uid', 'first_name', 'last_name', 'nickname', 'screen_name', 'sex', 'city', 'country', 'online', 'bdate', 'photo', 'photo_big']
56
56
 
57
57
  @raw_info ||= begin
58
58
  params = {
59
- :uid => uid,
59
+ :uids => uid,
60
60
  :fields => fields.join(','),
61
- :access_token => access_token.token
61
+ #:access_token => access_token.token,
62
62
  }
63
- result = access_token.get('/method/getProfiles', :params => params).parsed["response"]
63
+ result = access_token.get('/method/users.get', :params => params).parsed["response"]
64
64
  result && result.first ? result.first : nil
65
65
  end
66
66
  end
@@ -92,7 +92,7 @@ module OmniAuth
92
92
  if raw_info['country'] && raw_info['country'] != "0"
93
93
  params = {
94
94
  :cids => raw_info['country'],
95
- :access_token => access_token.token
95
+ :access_token => access_token.token,
96
96
  }
97
97
  country = access_token.get('/method/places.getCountryById', :params => params).parsed['response']
98
98
  country && country.first ? country.first['name'] : ''
@@ -106,7 +106,7 @@ module OmniAuth
106
106
  if raw_info['city'] && raw_info['city'] != "0"
107
107
  params = {
108
108
  :cids => raw_info['city'],
109
- :access_token => access_token.token
109
+ :access_token => access_token.token,
110
110
  }
111
111
  city = access_token.get('/method/places.getCityById', :params => params).parsed['response']
112
112
  city && city.first ? city.first['name'] : ''
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-vkontakte
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-27 00:00:00.000000000 Z
12
+ date: 2012-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth