Skip to content

Commit

Permalink
profile endpoint URL made configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwechner committed Nov 14, 2017
1 parent 87065c4 commit 98d3ba1
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -256,7 +256,8 @@ private Payload getAccessAndIdToken(String token_endpoint, String code) {
private Payload getUserInfoUsingAccessToken(String accessToken) throws Exception {
int connectionTimeout = 2000;
int socketTimeout = 25000;
java.net.URL url = new java.net.URL("https://graph.facebook.com/me");
// TODO: Google and Facebook do not have the same JSON as response!
java.net.URL url = new java.net.URL(getResourceConfigProperty("profile_endpoint_url"));
DefaultHttpClient httpClient = getHttpClient(url, null, null, connectionTimeout, socketTimeout);
String qs = "?fields=id,%20name,email&access_token=" + accessToken;
HttpGet httpGet = new HttpGet(url.toString() + qs);
Expand Down

0 comments on commit 98d3ba1

Please sign in to comment.