2011-12-21 37 views
26

我正在写一个C#应用程序以利用Linkedin's API如何检索关于LinkedIn账户的所有可能的信息? (使用C#的API)

我希望能够经过一个“人”来看待(名+姓)和with the same name

我目前使用我自己实现的REST API片面的检索所有关于这个群体的人的可能的信息与People-Search API调用。

这是我的要求,即工作:

https://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,headline,picture-url),num-results)? 

这样做(附:first-name=parameter&last-name=parameter after the ? mark

的问题是,我想找回更多类似的信息:名称,行业,当前的公司,目前,学校等参考,here为可能的参数

这个符号列表是他们所谓的Field Selectors

我如何构建我的API调用,以便我可以获取有关某人的所有可能信息?

回答

21

你已经获得的符号时,所有你需要做的就是添加字段选择器的其余部分,它们筑巢需要的地方:

https://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,headline,picture-url,industry,positions:(id,title,summary,start-date,end-date,is-current,company:(id,name,type,size,industry,ticker)),educations:(id,school-name,field-of-study,start-date,end-date,degree,activities,notes)),num-results)?first-name=parameter&last-name=parameter 

请记住,每Profile Field docs,你只能获得当前用户的第一级连接的教育。

+0

有没有在结果中看到的方式,哪个连接是来自我的连接?我有这个:http://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,picture-url,headline,positions:(title,company:(id ,name))),num-results)?company-name = [COMPANY]&format = json&count = 25,我看不出哪一个是第一个,哪一个是第二个dgree。 – 2013-04-22 19:07:35

37

这里是URL得到一切为用户配置文件:

https://api.linkedin.com/v1/people/~:(id,first-name,last-name,headline,picture-url,industry,summary,specialties,positions:(id,title,summary,start-date,end-date,is-current,company:(id,name,type,size,industry,ticker)),educations:(id,school-name,field-of-study,start-date,end-date,degree,activities,notes),associations,interests,num-recommenders,date-of-birth,publications:(id,title,publisher:(name),authors:(id,name),date,url,summary),patents:(id,title,summary,number,status:(id,name),office:(name),inventors:(id,name),date,url),languages:(id,language:(name),proficiency:(level,name)),skills:(id,skill:(name)),certifications:(id,name,authority:(name),number,start-date,end-date),courses:(id,name,number),recommendations-received:(id,recommendation-type,recommendation-text,recommender),honors-awards,three-current-positions,three-past-positions,volunteer)?oauth2_access_token=PUT_YOUR_TOKEN_HERE

需要OAuth2用户访问令牌。

这是一个不错的字符串列表(JAVA):

apiUrl 
    + "/v1/people/~:(" 
     + "id," 
     + "first-name," 
     + "last-name," 
     + "headline," 
     + "picture-url," 
     + "industry," 
     + "summary," 
     + "specialties," 
     + "positions:(" 
      + "id," 
      + "title," 
      + "summary," 
      + "start-date," 
      + "end-date," 
      + "is-current," 
      + "company:(" 
       + "id," 
       + "name," 
       + "type," 
       + "size," 
       + "industry," 
       + "ticker)" 
     +")," 
     + "educations:(" 
      + "id," 
      + "school-name," 
      + "field-of-study," 
      + "start-date," 
      + "end-date," 
      + "degree," 
      + "activities," 
      + "notes)," 
     + "associations," /* Full Profile */ 
     + "interests," 
     + "num-recommenders," 
     + "date-of-birth," 
     + "publications:(" 
      + "id," 
      + "title," 
      + "publisher:(name)," 
      + "authors:(id,name)," 
      + "date," 
      + "url," 
      + "summary)," 
     + "patents:(" 
      + "id," 
      + "title," 
      + "summary," 
      + "number," 
      + "status:(id,name)," 
      + "office:(name)," 
      + "inventors:(id,name)," 
      + "date," 
      + "url)," 
     + "languages:(" 
      + "id," 
      + "language:(name)," 
      + "proficiency:(level,name))," 
     + "skills:(" 
      + "id," 
      + "skill:(name))," 
     + "certifications:(" 
      + "id," 
      + "name," 
      + "authority:(name)," 
      + "number," 
      + "start-date," 
      + "end-date)," 
     + "courses:(" 
      + "id," 
      + "name," 
      + "number)," 
     + "recommendations-received:(" 
      + "id," 
      + "recommendation-type," 
      + "recommendation-text," 
      + "recommender)," 
     + "honors-awards," 
     + "three-current-positions," 
     + "three-past-positions," 
     + "volunteer" 
    + ")" 
    + "?oauth2_access_token="+ token; 
+1

如何编辑URL以便以json格式返回数据? – meteorBuzz 2015-01-14 13:29:08

+0

你将如何获得用户的电子邮件?我曾尝试在json中使用电子邮件地址,它不会返回任何内容?但当我只是试图查询

 APIUrl + "/v1/people/~:(" + "id," + "first-name," + "last-name," + "email-address" 
我收到电子邮件回来。你有什么建议吗? 谢谢 – kdnerd 2015-10-10 23:17:39

+0

如何获取位置? – 2016-10-16 23:20:46

10
+0

这是一个完美的API调用,但是由于其开发人员程序的最近更改,除非您是合作伙伴计划的一部分,否则很多这些字段是无法访问的。 如果你想测试上述呼叫,你可以使用类似这个控制台 https://apigee.com/console/linkedin – 2016-02-22 03:24:08

+0

仍然适用于我现在。因为我只是想知道我自己的数据。远地点控制台非常棒。 – 2016-07-02 16:10:24

+0

'消息:“未知的认证方案”,' – Green 2017-08-10 07:47:43

相关问题