@Override
public List<Contact> getContactList() throws Exception {
LOG.info("Fetching contacts from " + CONTACTS_FEED_URL);
if (Permission.AUTHENTICATE_ONLY.equals(this.scope)) {
throw new SocialAuthException(
"You have not set Permission to get contacts.");
}
Response serviceResponse = null;
try {
Map<String, String> map = new HashMap<String, String>();
map.put("Authorization", "Bearer " + getAccessGrant().getKey());
serviceResponse = authenticationStrategy.executeFeed(
CONTACTS_FEED_URL, null, null, map, null);
} catch (Exception ie) {
throw new SocialAuthException(
"Failed to retrieve the contacts from " + CONTACTS_FEED_URL,
ie);
}
List<Contact> plist = new ArrayList<Contact>();
Element root;