[英]how to connect linkedin from node js. Or how to get access token from node js
這是我的代碼。 現在,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);
});
}
});
消息中有什么令人費解: 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()
或針對用戶配置文件:使用指令和方法getAuthorizationUrl
生成url,然后實現redirect_url
路由以存儲用戶access_token
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.