diff options
author | 2018-03-02 00:27:56 +0300 | |
---|---|---|
committer | 2018-03-02 00:32:55 +0300 | |
commit | 15790c737b87b528f3a8eda4d4cb559220223bd6 (patch) | |
tree | b9e4cdbc727afe4de2484bb1136987decb87846a /juick-www/src/main/java/com/juick/www/controllers | |
parent | 29be476f86054134b7123bc545250a11e173489c (diff) |
www: vk api version 5.73
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/controllers')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java b/juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java index 674be157..6c9a1827 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java +++ b/juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java @@ -260,7 +260,7 @@ public class SocialLogin { .build(VkontakteApi.instance()); OAuth2AccessToken token = vkService.getAccessToken(code); - OAuthRequest meRequest = new OAuthRequest(Verb.GET, "https://api.vk.com/method/users.get?fields=screen_name"); + OAuthRequest meRequest = new OAuthRequest(Verb.GET, "https://api.vk.com/method/users.get?fields=screen_name&v=5.73"); vkService.signRequest(token, meRequest); String graph = vkService.execute(meRequest).getBody(); @@ -273,7 +273,7 @@ public class SocialLogin { throw new HttpBadRequestException(); } - Long vkID = NumberUtils.toLong(jsonUser.getUid(), 0); + Long vkID = NumberUtils.toLong(jsonUser.getId(), 0); int uid = crosspostService.getUIDbyVKID(vkID); if (uid > 0) { Cookie c = new Cookie("hash", userService.getHashByUID(uid)); |