LinkedIn API Field Selectors

I started reading and testing the LinkedIn API recently and am having problems using field selectors

My goal is to use the API to get information about people, for example, his first name, last name, current company and name.

By default, the people-search api returns only id,first-name and last-name .

I read that I can use field-selectors to clarify the result, but my question is: how do i use the field selectors with the parameters i want them to match aswell.

I tried:

 http://api.linkedin.com/v1/people-search?first-name=marcello&last-name=lins:(id,first-name,last-name,current-company,title) 

But this will not work, and this excludes the saying that this is a Bad request .

Do I need to make two requests?

 1: https://api.linkedin.com/v1/people-search?first-name=marcello&lastname=lins 2: https://api.linkedin.com/v1/people-search?:(first-name,last-name,current-company,title) 

Thank you in advance for your attention and feel free to edit my stream if it is not suitable for the XDA-Pattern.

+4
source share
1 answer

This API is now available only to Linkedin partners.

The following template is used in the documentation in the People Search API:

 http://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,picture-url,headline),num-results)?first-name=Steve&last-name=Smith 

All query parameters are optional (the full list is on the documents page), and the specified field selectors can be found on this page .

The reason you need to indicate that field selectors are "people" is because the people search API can also return "faces" that can be used in your search user interface to provide information about the results. In this case, we will return the location graphs that we could analyze and turn them into a set of flags similar to those found on the LinkedIn.com search page:

 http://api.linkedin.com/v1/people-search:(facets:(code,buckets:(code,name)),people:(id,first-name,last-name,picture-url,headline),num-results)?first-name=Steve&last-name=Smith&facets=location 

You can test all of these requests on the REST Console .

+6
source

Source: https://habr.com/ru/post/1387205/


All Articles