简体   繁体   English

无法从LinkedIn API获取全部信息

[英]Unable to get entire information from linkedIn api

I have tried this 我已经试过了

Html: HTML:

<a id="li_ui_li_gen_1432549871566_0-link" class="" href="javascript:void(0);" onclick="onLinkedInLoad();" style="margin-bottom: 20px;">

JS code: JS代码:

function onLinkedInLoad(logintype) {

  IN.User.authorize(function(){
          callback();
  });      

}
function callback(){
        IN.Event.on(IN, "auth", OnLinkedInAuth);
        OnLinkedInAuth();
}
function OnLinkedInAuth(){     

    IN.API.Profile("me")
.fields("firstName", "lastName", "industry", "location:(name)", "picture-url", "headline", "summary", "num-connections", "public-profile-url", "distance", "positions", "email-address", "educations:(id,school-name,field-of-study,start-date,end-date,degree,activities,notes)","languages:(id,language:(name),proficiency:(level,name))","skills:(id,skill:(name))", "date-of-birth")
.result(ShowProfileData)
.error(displayProfilesErrors);    
}

function ShowProfileData(profiles) {
    console.log(profiles); return false;

    //its gives me json responce 
    /*   {
        "_total": 1,
        "values": [{
          "_key": "~",
          "distance": 0,
          "emailAddress": "xxxxx@gmail.com",
          "firstName": "xxxx",
          "headline": "xxxxx",
          "industry": "Information Technology and Services",
          "lastName": "xxx",
          "location": {"name": "xxx Area, India"},
          "numConnections": 117,
          "positions": {
            "_total": 1,
            "values": [{
              "company": {
                "id": xxxxx,
                "industry": "E-Learning",
                "name": "xxxx",
                "size": "501-1000 employees",
                "type": "Privately Held"
              },
              "id": 485779823,
              "isCurrent": true,
              "startDate": {
                "month": 2,
                "year": 2013
              },
              "title": "xxxxx"
            }]
          },
          "publicProfileUrl": "https://www.linkedin.com/pub/xxxxx/xx/xx/xx"
        }]
      } */      
}
function displayProfilesErrors(error) {
    profilesDiv = document.getElementById("profiles");
    profilesDiv.innerHTML = error.message;
    console.log(error);
}

It looks to me that some queried fields (eg languages, skills, education fields) require that your application have been approved for the Apply with LinkedIn program. 在我看来,某些查询字段(例如语言,技能,教育领域)要求您的应用程序已被批准使用“通过LinkedIn申请”程序。

See: Profile field descriptions page which lists fields that require an additional API (ie 'Member profile fields available to Apply with LinkedIn developers' title), and see how one can apply for using this API: Request access to this API page. 请参阅:“ 配置文件字段描述”页面,其中列出了需要其他API的字段(即“可向领英开发人员申请的会员可用的配置文件字段”标题),并查看如何使用此API进行申请请求访问此API页面。

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

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