如何使用Linkedin API获取网站的个人资料详细信息?

时间:2016-06-29 05:14:01

标签: javascript linkedin-api

如何使用Oauth 2.0的最新LinkedIn javascript API将自己的个人资料详细信息发送到网站?

目标是使用关联的个人资料保持网站最新。

尝试下面,

api_key: YOUR_API_KEY_HERE
authorize: true
onLoad: onLinkedInLoad

// Setup an event listener to make an API call once auth is complete
function onLinkedInLoad() {
    IN.Event.on(IN, "auth", getProfileData);
}

// Handle the successful return from the API call
function onSuccess(data) {
    console.log(data);
}

// Handle an error response from the API call
function onError(error) {
    console.log(error);
}

// Use the API call 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);
}

https://developer.linkedin.com/docs/apply-with-linkedin

我不确定我应该怎么做,有人可以给我一个小费来开始吗?谢谢!

1 个答案:

答案 0 :(得分:0)

我不太了解它的JavaScript包装器实现,因为我已经用Java完成了它。但是这里有一个很好的教程,使用JQuery使用基本的REST实现来获取用户的数据。希望这可以帮助你,并让你开始:)。 http://www.kunal-chowdhury.com/2012/08/how-to-fetch-twitter-profile-information-using-jQuery-plugin-as-json-object.html?m=1

相关问题