From d1910811955a460d84b6f1a80b567fa7229bb44e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 7 Nov 2021 20:28:53 +0300 Subject: Stop using version in Facebook Graph API requests --- src/main/java/com/juick/www/api/ApiSocialLogin.java | 2 +- src/main/java/com/juick/www/controllers/SocialLogin.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/juick/www/api/ApiSocialLogin.java b/src/main/java/com/juick/www/api/ApiSocialLogin.java index ecd5ac1b..5e17d2b7 100644 --- a/src/main/java/com/juick/www/api/ApiSocialLogin.java +++ b/src/main/java/com/juick/www/api/ApiSocialLogin.java @@ -141,7 +141,7 @@ public class ApiSocialLogin { throw new HttpBadRequestException(); } OAuth2AccessToken token = facebookAuthService.getAccessToken(code); - final OAuthRequest meRequest = new OAuthRequest(Verb.GET, "https://graph.facebook.com/v3.2/me?fields=id,name,email"); + final OAuthRequest meRequest = new OAuthRequest(Verb.GET, "https://graph.facebook.com/me?fields=id,name,email"); facebookAuthService.signRequest(token, meRequest); String graph = facebookAuthService.execute(meRequest).getBody(); if (StringUtils.isBlank(graph)) { diff --git a/src/main/java/com/juick/www/controllers/SocialLogin.java b/src/main/java/com/juick/www/controllers/SocialLogin.java index 7acd6cdd..f7148b2d 100644 --- a/src/main/java/com/juick/www/controllers/SocialLogin.java +++ b/src/main/java/com/juick/www/controllers/SocialLogin.java @@ -144,7 +144,7 @@ public class SocialLogin { } OAuth2AccessToken token = facebookAuthService.getAccessToken(code); final OAuthRequest meRequest = new OAuthRequest(Verb.GET, - "https://graph.facebook.com/v3.2/me?fields=id,name,link,verified,email"); + "https://graph.facebook.com/me?fields=id,name,link,verified,email"); facebookAuthService.signRequest(token, meRequest); String graph = facebookAuthService.execute(meRequest).getBody(); if (StringUtils.isBlank(graph)) { -- cgit v1.2.3