Do you know how I can use the latest LinkedIn JavaScript API with OAuth 2.0 to retrieve my own profile details for a website?
The goal is to automatically update the website using my linked profile information.
I have attempted the following:
api_key: YOUR_API_KEY_HERE
authorize: true
onLoad: onLinkedInLoad
// Set up an event listener to call the API once authorization is complete
function onLinkedInLoad() {
IN.Event.on(IN, "auth", getProfileData);
}
// Process successful API call response
function onSuccess(data) {
console.log(data);
}
// Handle errors from the API call
function onError(error) {
console.log(error);
}
// Use the API wrapper to request the member's profile data
function getProfileData() {
IN.API.Raw("/people/~:(id, first-name, skills, educations,
languages, twitter-accounts)").result(onSuccess).error(onError);
}
Link to LinkedIn API documentation
I'm unsure about the exact steps needed to achieve this. Can anyone provide me with some guidance to help me get started? Thank you!