diff options
Diffstat (limited to 'juick-www/src/main/java/com')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java | 4 | ||||
-rw-r--r-- | juick-www/src/main/java/com/juick/www/vk/User.java | 10 |
2 files changed, 7 insertions, 7 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)); 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; } } |