Linkedin使用node.JS为OAuth2访问令牌交换JS API令牌?
我需要linkedin永久令牌获取的帮助。我正在使用node.js。 我能够成功地对用户进行身份验证,将安全cookie传递到我的后端。 如何将JSAPI令牌交换为OAuth1.0a访问令牌。 tmpAcesstoken='xxxxxxxxxxxxx'。还验证了签名。 我试过下面的方法Linkedin使用node.JS为OAuth2访问令牌交换JS API令牌?,node.js,linkedin-jsapi,Node.js,Linkedin Jsapi,我需要linkedin永久令牌获取的帮助。我正在使用node.js。 我能够成功地对用户进行身份验证,将安全cookie传递到我的后端。 如何将JSAPI令牌交换为OAuth1.0a访问令牌。 tmpAcesstoken='xxxxxxxxxxxxx'。还验证了签名。 我试过下面的方法 oa = new OAuth( "https://api.linkedin.com/uas/oauth/requestToken", "https://api.l
oa = new OAuth( "https://api.linkedin.com/uas/oauth/requestToken",
"https://api.linkedin.com/uas/oauth/accessToken",
"xxxxx", "xxxxxxxx", "1.0A",
"http://localhost:1337/", "HMAC-SHA1");
oa.get("http://api.linkedin.com/v1/people/~?oauth_oauth2_access_token="+tmpToken, function(error, data) {
if (error) {
console.log("error");
console.log(error);
} else {
console.log("success");
console.log(data);
}
});
此令牌的有效期仅为60天。如果用户60天未访问,我们如何刷新令牌
请任何人帮助我
谢谢。这里是如何将JS令牌交换到oauth 1.0a令牌的参考
我想如果不与用户交互,就无法刷新令牌