Question

I am using LinkedIn-j to get information from linkedIn for a group based on group Id, the problem is that I am not able to get total number of members for the group. Following in the code that I have written. Here Group object does not have any field that can give me this information.

imports

import com.google.code.linkedinapi.client.LinkedInApiClient;
import com.google.code.linkedinapi.client.LinkedInApiClientFactory;
import com.google.code.linkedinapi.client.enumeration.GroupField;
import com.google.code.linkedinapi.schema.Group;

Code

LinkedInApiClientFactory factory = LinkedInApiClientFactory.newInstance(apiKey, apiSecret); 
LinkedInApiClient client = factory.createLinkedInApiClient(oauthUserToken, oauthUserSecret);

Set<GroupField> fields = new HashSet<GroupField>();
fields.add(GroupField.CATEGORY);
fields.add(GroupField.CONTACT_EMAIL);
fields.add(GroupField.COUNTS_BY_CATEGORY);
fields.add(GroupField.DESCRIPTION);
fields.add(GroupField.ID);
fields.add(GroupField.IS_OPEN_TO_NON_MEMBERS);
fields.add(GroupField.LOCATION);
fields.add(GroupField.NAME);
fields.add(GroupField.POSTS);
fields.add(GroupField.RELATION_TO_VIEWER);
fields.add(GroupField.RELATION_TO_VIEWER_AVAILABLE_ACTIONS);
fields.add(GroupField.RELATION_TO_VIEWER_MEMBERSHIP_STATE);
fields.add(GroupField.SHORT_DESCRIPTION);
fields.add(GroupField.SITE_GROUP_URL);
fields.add(GroupField.WEBSITE_URL);

Group group=  client.getGroupById(linkedInGroupId, fields);
Était-ce utile?

La solution

There is no way this information is available, following this with linkedIn and will update if I find anything useful

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top