我正在尝试使用LinkedIn API搜索用户。我得到了例外
com.google.code.linkedinapi.client.LinkedInApiClientException: [invalid.profile.access]. You don't have access to the profile
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.createLinkedInApiClientException(BaseLinkedInApiClient.java:3906)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.callApiMethod(BaseLinkedInApiClient.java:3781)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.callApiMethod(BaseLinkedInApiClient.java:3725)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.getProfileById(BaseLinkedInApiClient.java:1067)
我将如何处理此异常。我想只看到公开显示其个人资料的用户的用户个人资料。 我正在使用使用java的linkedin-j库
LinkedInApiClient liClient;
Map<SearchParameter,String> searchParameters =new EnumMap<SearchParameter, String>(SearchParameter.class);
searchParameters.put(SearchParameter.FIRST_NAME, firstName);
searchParameters.put(SearchParameter.LAST_NAME, lastName);
people =liClient.searchPeople(searchParameters,start,25);