简体   繁体   中英

How to get company details using IN.API.Profile(“me”) Javascript API Call

I am trying to get company details and academic details using Linkedin JavaScript API call.

This is the code:

IN.API.Profile("me")
    .fields([
            "firstName","lastName","headline","positions:(company)","industry",
            "location:(name)","pictureUrl","publicProfileUrl","emailAddress",
            "educations","dateOfBirth"])
    .result(function(result) {
      console.log('inside onLinkedInLogin=============>');  
      console.log(result);  
      setLoginBadge(result.values[0]);
    })
    .error(function(err) {
      alert(err);
    });

The got full details for education including degree,endDate,fieldOFStudey,id,schoolname, startDate etc...

But for Positions i only got company with id and name.

I would like to fetch more details from positions like position name like "consultant" and startDate,endDate,current position etc...

Any help will be highly appreciated.

i found it myself with a few more research and hope this may help someone..

IN.API.Profile("me")
    .fields([
            "firstName","lastName","headline","positions:(company,title,summary,startDate,endDate,isCurrent)","industry",
            "location:(name,country:(code))","pictureUrl","publicProfileUrl","emailAddress",
            "educations","dateOfBirth"])
    .result(function(result) {
      console.log('inside onLinkedInLogin=============>');  
      console.log(result);  
      setLoginBadge(result.values[0]);
    })
    .error(function(err) {
      alert(err);
    });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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