I am trying to authenticate linkedin using js sdk in my app. It is working fine in windows and linux but not in my mac system. Is it issue with my browser or any other think i need to include in my app ?
For Chrome : failed to load resources: server responded with a status 401.
And for safari :
<error>
<status> 401 </ status>
<timestamp> 1411477731856 </ timestamp>
<request-id> HJJUYKUKGU554 </ request-id>
<error code> 0 </ error-code>
<message> Unknown authentication scheme </ message>
</ error>
Here is the code:
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: 4f4f54d4dgf
authorize: true
scope: r_emailaddress,w_share,r_basicprofile
</script>
<script type="text/javascript">
function liAuth() {
IN.Event.on(IN, "systemReady", sysRed);
function sysRed() {
IN.User.authorize(callbackFunction);
}
function callbackFunction() {
var client_id = '{{$_ENV['LN_CLIENT_ID']}}';
var redirect_uri = '{{urlencode($_ENV['LN_REDIRECT_URI'])}}';
var state = '{{csrf_token()}}';
var id, Name, emailAddress, pictureUrl, profileUrl, numConnections;
IN.API.Profile("me").fields("id,firstName,lastName,email-address,num-connections,picture-urls::(original),public-profile-url").result(function (me) {
console.log(me);
});
}
}
</script>
Any one know why these error is showing ?