-1

嗨,我想使用linkedin api从linkedin获取整个组列表,如果不可能,至少从linkedin获取一些组来处理数据。有人可以帮助如何获取组列表吗?

4

1 回答 1

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());
        }
于 2013-12-25T12:34:49.773 回答