我正在尝试使用 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);