-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoMethodError: undefined method `[]' for nil:NilClass #17
Comments
Мне кажется метод getProfiles устарел и юзать нужно users.get |
Похоже проблема не в методе getProfiles
|
Кроме этого параметр |
def raw_info
# http://vk.com/developers.php?o=-17680044&p=Description+of+Fields+of+the+fields+Parameter
fields = ['uid', 'first_name', 'last_name', 'nickname', 'sex', 'city', 'country', 'online', 'bdate', 'photo', 'photo_big']
@raw_info ||= begin
params = {
:uids => uid,
:fields => fields.join(','),
:access_token => access_token.token
}
result = access_token.get('/method/users.get', :params => params).parsed["response"]
result && result.first ? result.first : nil
end
end Этот код работает. |
блин.. задолбали они ... |
Страну и город тоже получает? ВКонтакте последнее время совсем упоролись |
А удалось выяснить откуда берется "User authorization failed: user revoke access for this token." и что с ней делать? Фикс не помог :-/ |
точнее, если не передавать access_token то это, конечно, поможет. Но при этом отдается только та инфа, которую пользователь выставил наружу. В моем случае, не отдается city_id, который нужен. |
Да, раньше была проблема. Сейчас попробовал, вроде все отдается. |
Снова эта ошибка: NoMethodError: undefined method `[]' for nil:NilClass |
+1 |
2 similar comments
+1 |
+1 |
+1 |
+1 |
С каждым днем все интереснее, пользователей правда пугает регистрация без вконтакте.
Выскакивает после нажатия на "разрешить" и редирект на приложение.
…h-vkontakte-1.1.2/lib/omniauth/strategies/vkontakte.rb: 37:in
block in <class:Vkontakte>' …uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 102:in
instance_eval'…uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 102:in
block in compile_stack' …uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 101:in
each'…uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 101:in
inject' …uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 101:in
compile_stack'…uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 315:in
info' …uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 328:in
auth_hash'…uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 355:in
callback_phase' …mniauth-oauth2-1.1.1/lib/omniauth/strategies/oauth2.rb: 77:in
callback_phase'…uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 219:in
callback_call' …uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 175:in
call!'…uby/1.9.1/gems/omniauth-1.1.1/lib/omniauth/strategy.rb: 157:in
call' …ations-3.1.4/lib/client_side_validations/middleware.rb: 18:in
call'…ems/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb: 35:in
block in call' …ems/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb: 34:in
catch'…ems/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb: 34:in
call' …hared/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb: 23:in
call'…/ruby/1.9.1/gems/rack-1.4.1/lib/rack/conditionalget.rb: 25:in
call' …/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb: 205:in
context'…/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb: 200:in
call' …/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb: 21:in
call'…ed/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb: 17:in
call' …hared/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb: 15:in
call'…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 136:in
forward' …by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 245:in
fetch'…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 185:in
lookup' …by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 66:in
call!'…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 51:in
call' …by/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb: 535:in
process_client'…by/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb: 610:in
worker_loop' …by/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb: 491:in
spawn_missing_workers'…by/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb: 502:in
maintain_worker_count' …by/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb: 276:in
join'The text was updated successfully, but these errors were encountered: