bytespider/jsOAuth — Issue #31: jsOAuth and LinkedIn
Author: joelones
Created: 2012-02-09 01:10:26+00:00
State: open

I am unable to get a oauth_verifier with the most current version of the jsOAuth (1.3.1) library running in a phonegap + jquerymobile app.

Both twitter and facebook integration runs fine. Is LinkedIn supported?

Sample code:

auth.get('https://api.linkedin.com/uas/oauth/requestToken',
function(data) {
requestParams = data.text;
console.log("Log: requestParams: " + data.text);
window.plugins.childBrowser.showWebPage('https://api.linkedin.com/uas/oauth/authorize?'+data.text,
{ showLocationBar : locbar });
},
function(data) {
alert('Error : No Authorization');
console.log("Log: 2 Error " + data);
}
);

I am redirected to the login screen
I grant access to the application I am redirected to the callback url with the oauth verifier and the oauth token.

Then I go for the accessToken

oauth.get('https://api.linkedin.com/uas/oauth/accessToken?'+verifier+"&"+requestParams,
function(data) {
alert("Data"+data);
request2Params = data.text;
console.log("Log: requestParams: " + data.text);
//window.plugins.childBrowser.showWebPage('https://api.linkedin.com/uas/oauth/accessToken?'+newParams,
// { showLocationBar : true });
},
function(data) {
alert('Error : No Authorization');
console.log("Log: 2 Error " + data.text);
}
);

I get:

"oauth_problem=signature_invalid&oauth_problem_advice=com.linkedin.security.auth.pub.LoginDeniedInval…"