Domanda

I am trying to get the Connections or user's friends info from LinkedIn using LinkedIn jar for android and example given in google code, but i wont get Connections using linkedInApiClient.getConnectionsForCurrentUser() this method call it returns null, but i can access user current profile info using linkedInApiClient.getProfileForCurrentUser()

can any body suggest me how to get User connections information in linkedIn in android. Or guide me the the wright way.

È stato utile?

Soluzione

I got the solution for the above ask question, what I was doing wrong, was that we have to pass an argument of the ProfileField information we want, like this:

final Set<ProfileField> connectionFields = EnumSet.of(ProfileField.ID, ProfileField.MAIN_ADDRESS,
                ProfileField.PHONE_NUMBERS, ProfileField.LOCATION,
                ProfileField.LOCATION_COUNTRY, ProfileField.LOCATION_NAME,
                ProfileField.FIRST_NAME, ProfileField.LAST_NAME, ProfileField.HEADLINE,
                ProfileField.INDUSTRY, ProfileField.CURRENT_STATUS,
                ProfileField.CURRENT_STATUS_TIMESTAMP, ProfileField.API_STANDARD_PROFILE_REQUEST,
                ProfileField.EDUCATIONS, ProfileField.PUBLIC_PROFILE_URL, ProfileField.POSITIONS,
                ProfileField.LOCATION, ProfileField.PICTURE_URL);
        Connections connections = client.getConnectionsForCurrentUser(connectionFields);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top