aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-02 00:27:56 +0300
committerGravatar Vitaly Takmazov2018-03-02 00:32:55 +0300
commit15790c737b87b528f3a8eda4d4cb559220223bd6 (patch)
treeb9e4cdbc727afe4de2484bb1136987decb87846a /juick-www/src/main/java/com/juick
parent29be476f86054134b7123bc545250a11e173489c (diff)
www: vk api version 5.73
Diffstat (limited to 'juick-www/src/main/java/com/juick')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java4
-rw-r--r--juick-www/src/main/java/com/juick/www/vk/User.java10
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;
}
}