Hi I am trying to use Linkedin APIs with oAuth authentication. I am getting
an error as
[unauthorized]. The request token used hasn't been authorized by user
Can any one help what mistake I am doing?
*var oauth = require('oauth').OAuth;
var request = require('request');
var key= "<<App Key>>";
var secret = "<<App Secret Key>>";*
*var oa = new oauth(
"**https://api.linkedin.com/uas/oauth/requestToken*<https://api.linkedin.com/uas/oauth/requestToken>
*",
"**https://api.linkedin.com/uas/oauth/accessToken*<https://api.linkedin.com/uas/oauth/accessToken>
*",
key,
secret,
"1.0",
null,
"HMAC-SHA1"
);*
*//Recieve the oAuth token and oAuth Secret token
oa.getOAuthRequestToken(function(error, oauth_token, oauth_token_secret, *
*results){ *
*var apiOAuth =
{
consumer_key: key,
consumer_secret: secret,
token: oauth_token,
token_secret: oauth_token_secret
};*
*var apiURL = 'http://api.linkedin.com/v1/company-search?keywords=philips';
request.get({url:apiURL,oauth:apiOAuth},function(e,r,data)
{
console.log('Error is: ' + e);
console.log('Data is: ' + data);
console.log('Response is: ' + r);
});*
*});*
Thanks
Nabarun
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en