这是我的代码。现在,IN.API.Profile(“ me”)函数不起作用。他们返回404错误,并显示类似“ v1已过时”的消息。这样任何人都可以帮助我。 预先谢谢。!
IN.User.authorize(() => {
if (IN.User.isAuthorized()) {
IN.API.Profile("me").fields([
"id", "first-name", "last-name", "headline", "positions", "location",
"num-connections", "emailAddress", "publicProfileUrl", "picture-urls::(original)",
"publications", "languages", "skills", "certifications", "educations", "volunteer",
"recommendations-received","date-of-birth",
]).result((data) => {
console.warn(data);
});
}
});
答案 0 :(得分:0)
消息v1 was deprecated
中有什么不明白的地方?
对此API版本的最终支持。更新库https://www.npmjs.com/package/node-linkedin-v2
//编辑,示例代码
let in = new LinkedInRestClient(...)
let access_token = await in.getAccessToken(...)
in.getCurrentMemberProfile(fields, access_token).then()
或者对于用户个人资料:使用instruction和方法getAuthorizationUrl
生成url,然后实施redirect_url
路由来存储用户access_token