We have a linkedin profile with 680 connections. We want display all the user
connections,so we are getting connections for that user and iterating through
the PersonList object.
Here is the sample code:
LinkedInApiClientFactory factory = LinkedInApiClientFactory.newInstance(apiKey,
apiSecret);
LinkedInApiClient client = factory.createLinkedInApiClient(accessToken);
Connections cons =
client.getConnectionsForCurrentUser(EnumSet.of(ProfileField.FIRST_NAME,
ProfileField.LAST_NAME,ProfileField.DATE_OF_BIRTH,
ProfileField.SITE_STANDARD_PROFILE_REQUEST_URL,
ProfileField.POSITIONS_IS_CURRENT,ProfileField.LOCATION_NAME,
ProfileField.POSITIONS_COMPANY,
ProfileField.POSITIONS_COMPANY_NAME,ProfileField.PICTURE_URL,ProfileField.CONNEC
TIONS,
ProfileField.ID,ProfileField.NUM_CONNECTIONS, ProfileField.POSITIONS_TITLE));
List<Person> personList = cons.getPersonList();
When we do: cons.getTotal(); we are getting 680 (which is correct)
But when we do: personList.size(); we are getting 670
Initially we thought this might be because some of the connections have set the
privacy setting( to share info with 3rd party apps as false).
But that doesn't seem to be the case. The PersonList object is returning those
connections also (with blank id and name)
Why this discrepancy?Are we missing anything in our code?
Original issue reported on code.google.com by kalyan.c...@gmail.com on 6 Feb 2012 at 6:21
Original issue reported on code.google.com by
kalyan.c...@gmail.com
on 6 Feb 2012 at 6:21