简体   繁体   English

如何通过公司名称在Linkedin中搜索人员

[英]How to search people in Linkedin by company name

I've this simple code 我有这个简单的代码

private static Map<SearchParameter, String> searchParameters = new HashMap<SearchParameter, String>();

//get data with LinkedIn API
public static void main(String args[]) throws InterruptedException, SQLException, MalformedURLException, IOException {
    PeopleApiClient linkedin = authentication();

                searchParameters.put(SearchParameter.COMPANY_NAME, "Facebook");
                System.out.println(searchParameters);
                People people = linkedin.searchPeople(searchParameters);
                System.out.println(people);
}

//LinkedIn authentication
private static PeopleApiClient authentication() {
    // The factory instance is re-usable and thread safe.
    final LinkedInApiClientFactory factory = LinkedInApiClientFactory.newInstance(CONSUMER_KEY_VALUE, CONSUMER_SECRET_VALUE);
    final PeopleApiClient linkedin = factory.createPeopleApiClient(ACCESS_TOKEN_VALUE, TOKEN_SECRET_VALUE);
    return linkedin;
}

And this error: 而这个错误:

 Exception in thread "main" com.google.code.linkedinapi.client.LinkedInApiClientException: Access to people search denied.

I don't know why I can't search people on LinkedIn by company name, (ie is Facebook). 我不知道为什么我不能通过公司名称搜索LinkedIn上的人(即Facebook)。 I've set the app in Developer section of Linkedin with all read and write permission. 我已经在Linkedin的开发者部分设置了所有读写权限的应用程序。

I'm using linkedin-j for doing all this. 我正在使用linkedin-j来做这一切。

Someone can help me? 有人可以帮帮我吗?

Thanks a lot for your time :) 非常感谢你的时间:)

我认为他们正在关闭对API的公开访问

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM