我希望使用linkedin api从linkedin获取整个组列表,如果不可能至少从linkedin获取一些组来处理数据。任何一个帮助如何获取组列表?
答案 0 :(得分:0)
您可以使用以下代码获取群组:
final LinkedInApiClientFactory factory = LinkedInApiClientFactory.newInstance(consumerKey, consumerSecKey);
final LinkedInApiClient client = factory.createLinkedInApiClient(token, tokenSecret);
GroupMemberships memberships = client.getGroupMemberships();
for (GroupMembership membership : memberships.getGroupMembershipList()) {
System.out.println(membership.getGroup().getName());
System.out.println(membership.getGroup().getId());
System.out.println(membership.getMembershipState().getCode());
}