Few days ago i write facebook integration using spring's tutorial. Here is my code
FacebookConnectionFactory connectionFactory = new FacebookConnectionFactory("appId", "appSecret");
OAuth2Operations oauthOperations = connectionFactory.getOAuthOperations();
OAuth2Parameters params = new OAuth2Parameters("http://localhost:8080/shop/facebook");
String authorizeUrl = oauthOperations.buildAuthorizeUrl(GrantType.IMPLICIT_GRANT, params);
try {
response.sendRedirect(authorizeUrl);
LOG.error("ALL WORKING FINE>>>");
} catch (IOException e) {
LOG.error("Errorrrrr" + e);
}
return null;
Then i should to get access_token, but it comes to me in hash part of the URL(so i should get the access_token using JS) - wrong way. After that i install another tutorial Spring-Social-quickstart and i can not understand how it retrieve access_token? What should i write to get access_token on the server side. Should it be some interceptors of the request, or exists another ways?