0
我在嘗試使用node-linkedin實施connexion示例時遇到問題。node-linkedin連接問題
我總是得到這樣的錯誤:{ errorCode: 0, message: 'Invalid access token.', requestId: 'IN32C163DK', status: 401, timestamp: 1459554255669 }
這裏我的代碼:
var nodemailer = require('nodemailer');
var Linkedin = require('node-linkedin')('app-id', 'secret', 'callback');
router.get('/linkedin', function(req, res) {
console.log("hello linkedin");
var linkedin = Linkedin.init('my_access_token');
linkedin.companies_search.name('facebook', 1, function(err, company) {
console.log(company);
name = company.companies.values[0].name;
desc = company.companies.values[0].description;
industry = company.companies.values[0].industries.values[0].name;
city = company.companies.values[0].locations.values[0].address.city;
websiteUrl = company.companies.values[0].websiteUrl;
});
});
這裏包的鏈接:https://github.com/ArkeologeN/node-linkedin
你能幫我對嗎?
謝謝
您是否正確傳遞了您從鏈接中收到的訪問權限?你是否遵循了https://developer.linkedin.com/docs/oauth2中給出的過程? –