From 15790c737b87b528f3a8eda4d4cb559220223bd6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 2 Mar 2018 00:27:56 +0300 Subject: www: vk api version 5.73 --- .../src/main/java/com/juick/www/controllers/SocialLogin.java | 4 ++-- juick-www/src/main/java/com/juick/www/vk/User.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'juick-www/src/main/java') 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)); diff --git a/juick-www/src/main/java/com/juick/www/vk/User.java b/juick-www/src/main/java/com/juick/www/vk/User.java index d70f40f7..749631bb 100644 --- a/juick-www/src/main/java/com/juick/www/vk/User.java +++ b/juick-www/src/main/java/com/juick/www/vk/User.java @@ -23,7 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Created by vitalyster on 28.11.2016. */ public class User { - private String uid; + private String id; private String firstName; private String lastName; private String screenName; @@ -55,11 +55,11 @@ public class User { this.screenName = screenName; } - public String getUid() { - return uid; + public String getId() { + return id; } - public void setUid(String uid) { - this.uid = uid; + public void setId(String id) { + this.id = id; } } -- cgit v1.2.3