-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing an exemple #62
Comments
You have to put access token here: Also, the object initiation should be moved on top next to loading. var Linkedin = require('node-linkedin')('app-id', 'secret', 'callback');
var linkedin = LinkedIn.init(accessToken); |
thank you for response. I have changed the code to the below and and I have this issue:
here my code: ` router.get('/linkedin1', function(req, res) {
}); router.get('/linkedin', function(req, res) {
}); Thank you for your help! |
You need to change this line: And let me know if it doesn't work out. |
can you provide an example w/o the express garbage? I want to use node.js simple script to access linkedin api. Is it possible? I don't see a way to get access token. |
@chovy to get access token, the following flow works:
Goto |
most oAuth services support authentication with username/password. Does this one? I cannot open a browser, like I said its a cli script that runs on the server. I've been able to do this with other oAuth apis, youtube, reddit, bing, twitter. but not linked in. Here's SO answer that we are looking for answer on. Would you mind taking a look? |
@chovy I'm not sure if LinkedIn supports password based authentication. Generally, its against the practice to seek password and that's why OAuth2.0 was designed. You can see if there's an application-token or something similar in LinkedIn API (it may work as a password). |
I agree but Oauth 2.0 itself allows for password auth for server side scripts and also development. |
Hello,
I'm trying to implement an exemple of connexion but I always get this error:
{ errorCode: 0, message: 'Invalid access token.', requestId: 'IN32C163DK', status: 401, timestamp: 1459554255669 }
Here the code:
`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;
});
});
`
Can you help me on that please?
Thanks
The text was updated successfully, but these errors were encountered: