tokenPost.setEntity(new StringEntity(entity, "UTF-8"));
CloseableHttpResponse resp1 = httpclient.execute(tokenPost);
ObjectReader jreader = Utils.getJsonReader(Map.class);
if (resp1 != null && resp1.getEntity() != null) {
Map<String, Object> token = jreader.readValue(resp1.getEntity().getContent());
if (token != null && token.containsKey("access_token")) {
// got valid token
HttpGet profileGet = new HttpGet(PROFILE_URL);
profileGet.setHeader(HttpHeaders.AUTHORIZATION, "Bearer " + token.get("access_token"));
CloseableHttpResponse resp2 = httpclient.execute(profileGet);