简体   繁体   中英

Not able to get other(other than signed in user) Linkedin Members Profile basic data from their email ID using Linkedin API

I want to get the basic profile details of all the Linkedin Members based on their mail ID, but I am not able to get the relevant information in their docs.

I tried to create an app, initialized the JavaScript SDK, authenticated and tried to access the basic_profile data, but can fetch only the Signed in user basic profile data and not the other Linkedin Member's basic profile data :

<script type="text/javascript" src="//platform.linkedin.com/in.js">
    api_key:   XXXXXXXXXXXXX
    onLoad:    authorize
    authorize: true
</script>

<script>
function authorize(){
    console.log("success");

    IN.User.authorize(data);
}

function data(){

    IN.API.Profile("me").result(ShowProfileData);// Can I use this call to

// get other people details by replacing "me" with the other person mail id.
}

function ShowProfileData(profiles) {
    var member = profiles.values[0];
    var id=member.id;
    var firstName=member.firstName; 
    var lastName=member.lastName; 
    var photo=member.pictureUrl; 
    var headline=member.headline; 

    console.log(firstName + lastName + photo);

    //use information captured above
}
</script>

And that is like that by design. You will need to be a partner and have your application approved to be able to access detailed data beyond the signed user.

Edit to respond to comment: Check https://developer.linkedin.com/docs/guide/v2/people/profile-api#me

Entries such as patents, publications, will have other ids.

Notice that you will not be able to get a list of all user id's in LinkedIn, but you can the one for the users that grant the auth and the ones in their profiles.

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