Skip to content
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

social provider VK api fix #11

Merged
merged 2 commits into from
May 31, 2020
Merged

social provider VK api fix #11

merged 2 commits into from
May 31, 2020

Conversation

Gsom1
Copy link
Contributor

@Gsom1 Gsom1 commented May 24, 2020

version must be passed as 'v', see https://vk.com/dev/api_requests
user.get response: https://vk.com/dev/users.get

version must be passed as 'v', see https://vk.com/dev/api_requests
user.get response: https://vk.com/dev/users.get
@dracony
Copy link
Member

dracony commented May 30, 2020

Thanks a lot!
Sorry I missed your CR last week so am replying late.

Are you sure about the uid to id change?

I think the documentation here https://vk.com/dev/users.get is for the latest api version while 5.52 (the default one) I am pretty sure used uid. Old docs here: https://web.archive.org/web/20180716205839/https://vk.com/dev/fields

To ensure backwards compatibility with existing users (those who would have older version specified in their config) can you make the code check for both uid and id in the response?

Thanks!

@Gsom1
Copy link
Contributor Author

Gsom1 commented May 31, 2020

Hi, Roman

I've added the backwards compatibility.

Yep, it's weird but it is.
Please see below queries and responses for new and old versions,
you can try it by yourself, the links are working.

https://api.vk.com/method/users.get?user_ids=httpkip&access_token=fce9ee42fce9ee42fce9ee42b7fca1f63effce9fce9ee42a23ab18d8310643f28bcacdd&v=5.107
{"response":[{"id":230066844,"first_name":"Pavel","last_name":"Dontsov","is_closed":false,"can_access_closed":true}]}

https://api.vk.com/method/users.get?user_ids=httpkip&access_token=fce9ee42fce9ee42fce9ee42b7fca1f63effce9fce9ee42a23ab18d8310643f28bcacdd&v=5.52
{"response":[{"id":230066844,"first_name":"Pavel","last_name":"Dontsov"}]}

@dracony dracony merged commit bc6d832 into PHPixie:master May 31, 2020
@dracony
Copy link
Member

dracony commented May 31, 2020

Thanks! Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants