diff options
author | 2017-07-21 11:35:43 +0300 | |
---|---|---|
committer | 2017-07-21 11:39:54 +0300 | |
commit | df0bb7c64a5c2a637af23bbb19d501a66e8805e4 (patch) | |
tree | 3b40b862ed49f66a1e7d72c9599f29eeeb7def03 /juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java | |
parent | 664bc928c2ec6b1afb23636ddfc17424973d7dab (diff) |
www: update scribejava deprecated api calls
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java b/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java index 2b85c07c..0233899f 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java +++ b/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java @@ -38,6 +38,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; +import javax.annotation.PostConstruct; import javax.inject.Inject; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; @@ -69,8 +70,9 @@ public class FacebookLogin { @Inject UserService userService; - public FacebookLogin() { - serviceBuilder = new ServiceBuilder(); + @PostConstruct + public void init() { + serviceBuilder = new ServiceBuilder(FACEBOOK_APPID); } @GetMapping("/_fblogin") @@ -85,7 +87,6 @@ public class FacebookLogin { Cookie c = new Cookie("fbstate", fbstate); response.addCookie(c); OAuth20Service facebookAuthService = serviceBuilder - .apiKey(FACEBOOK_APPID) .apiSecret(FACEBOOK_SECRET) .callback(FACEBOOK_REDIRECT) .scope("publish_actions") |