【问题标题】:Unable to get entire information from linkedIn api无法从linkedIn api获取全部信息
【发布时间】:2015-12-20 09:15:32
【问题描述】:

我试过了

HTML:

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

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);
}

【问题讨论】:

  • 怎么了?你有什么问题?
  • @Mariano .. 我无法从 api 获得教育、语言、技能领域
  • .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")他们中的几个

标签: javascript php jquery linkedin-api


【解决方案1】:

在我看来,某些查询的领域(例如语言、技能、教育领域)要求您的申请已获得通过 LinkedIn 申请计划的批准。

请参阅:Profile field descriptions 页面,该页面列出了需要额外 API 的字段(即“会员资料字段可用于通过 LinkedIn 开发人员申请”标题),并了解如何申请使用此 API:Request access to this API 页面。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-02-09
    • 1970-01-01
    • 2023-01-05
    • 2019-05-18
    • 2015-06-21
    • 2016-05-08
    • 1970-01-01
    相关资源
    最近更新 更多