Closed sproutly closed 10 years ago
Added 5589500a225acb27f7c9b74d11c7792db2f04267
the commit didn't seem to work
I'm not sure what problem you're facing. Can you please show your stack trace or snippet what you're doing?
Just a quick, do this:
var Linkedin = require('node-linkedin')('api', 'secret', 'callback');
// Example if using express
app.get('/oauth/linkedin', function(req, res) {
Linkedin.auth.authorize(res, ['r_basicprofile', 'r_fullprofile', 'r_emailaddress', 'r_network', 'r_contactinfo', 'rw_nus', 'rw_groups', 'w_messages']);
});
app.get('/oauth/linkedin/callback', function(req, res) {
Linkedin.auth.getAccessToken(res, req.query.code, function(err, results) {
if ( err )
return console.error(err);
/**
* Results have something like:
* {"expires_in":5184000,"access_token":". . . ."}
*/
console.log(results);
return res.redirect('/');
});
});
Also, don't forget to update your version to 1.0.4
.
When I follow the Readme and implment the following method:
I get the error:
Since I can't OAuth an user, I can't the use the rest of the wrapper