Skip to content

Instantly share code, notes, and snippets.

@Noah-Huppert
Last active December 28, 2015 14:29
Show Gist options
  • Save Noah-Huppert/7cb330e3889fb26ff02f to your computer and use it in GitHub Desktop.
Save Noah-Huppert/7cb330e3889fb26ff02f to your computer and use it in GitHub Desktop.
Error:
XMLHttpRequest cannot load http://sandbox.evernote.com/oauth.
The request was redirected to 'https://sandbox.evernote.com/oauth',
which is disallowed for cross-origin requests that require preflight.
Code:
//Evernote
var hostName = "http://sandbox.evernote.com";
///Change to http://www.evernote.com for production
var
options, oauth;
options = {
consumerKey : '**********',
consumerSecret : '************',
callbackUrl : 'portal.php',
signatureMethod : "HMAC-SHA1",
};
oauth = OAuth(options);
oauth.request({
'method' : 'GET',
'url' : hostName + '/oauth',
'success' : success,
'failure' : failure
});
function success() {
}
function failure() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment