Comments (15)
Мне кажется метод getProfiles устарел и юзать нужно users.get
Убрали getProfiles из документации.
from omniauth-vkontakte.
Похоже проблема не в методе getProfiles
ВКонтакте стал возвращать для всех методов:
{"error":{"error_code":5,"error_msg":"User authorization failed: user revoke access for this token."
from omniauth-vkontakte.
Кроме этого параметр uid
больше не поддерживается. Используется uids
.
Но это не решает проблему.
from omniauth-vkontakte.
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
Этот код работает.
Поле domain больше не используется.
from omniauth-vkontakte.
блин.. задолбали они ...
...subscribe ...
from omniauth-vkontakte.
Страну и город тоже получает?
А то у меня вообще ничего не работает.
ВКонтакте последнее время совсем упоролись
from omniauth-vkontakte.
А удалось выяснить откуда берется "User authorization failed: user revoke access for this token." и что с ней делать? Фикс не помог :-/
from omniauth-vkontakte.
точнее, если не передавать access_token то это, конечно, поможет. Но при этом отдается только та инфа, которую пользователь выставил наружу. В моем случае, не отдается city_id, который нужен.
from omniauth-vkontakte.
Да, раньше была проблема. Сейчас попробовал, вроде все отдается.
from omniauth-vkontakte.
Снова эта ошибка:
NoMethodError: undefined method `[]' for nil:NilClass
[GEM_ROOT]/bundler/gems/omniauth-vkontakte-8629dfeeef23/lib/omniauth/strategies/vkontakte.rb:36
from omniauth-vkontakte.
+1
from omniauth-vkontakte.
+1
from omniauth-vkontakte.
+1
from omniauth-vkontakte.
+1
Вот в этом месте uid { raw_info['id'].to_s }
from omniauth-vkontakte.
+1
from omniauth-vkontakte.
Related Issues (20)
- Error on callback redirect HOT 1
- Unneeded API calls
- Update gem on rubygems please HOT 2
- Нет email адреса
- Работает ли данный модуль со Standalone приложениями? HOT 2
- Could not find a strategy with name `Vkontakte'. Please ensure it is required or explicitly set it using the :strategy_class option. (Devise::OmniAuth::StrategyNotFound) HOT 1
- redirect_uri is invalid, please pass same redirect_uri, you used in authorize method HOT 5
- ERROR -- omniauth: (vkontakte) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected HOT 2
- Getting 502 on callback HOT 2
- Работа в develompent HOT 7
- Offline Access HOT 9
- invalid_credentials: OAuth2::Error, invalid_grant: Code is invalid or expired HOT 1
- Add Rubocop
- Пустой request.env['omniauth.auth'] HOT 3
- client_id is incorrect HOT 5
- Bump omniauth-oauth2 version HOT 1
- [Question] Send token straight to omniauth_callback
- иногда выскакивает NoRawData HOT 2
- Creating a gem release for omniauth-oauth2 dependency update HOT 2
- {"error":"invalid_client","error_description":"client_id is undefined"} HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omniauth-vkontakte.