Skip to content

Instantly share code, notes, and snippets.

@spolu
Created August 16, 2011 17:05
Show Gist options
  • Save spolu/1149559 to your computer and use it in GitHub Desktop.
Save spolu/1149559 to your computer and use it in GitHub Desktop.
Oauth-RequestToken
var OAuth= require('oauth').OAuth;
var oa = new OAuth("https://api.twitter.com/oauth/request_token",
"https://api.twitter.com/oauth/access_token",
"gQMpiVjZFMqQnJcdRhetw",
"VklJTgBbL9upi3jNWJmaN1Yh6qXCrK96787Ef4gUg",
"1.0",
"http://usecrowd.com/oauth",
"HMAC-SHA1");
oa.getOAuthRequestToken(function(err, oauth_token, oauth_token_secret, results) {
if(err) {
util.debug(util.inspect(err));
cont_({ object: my.object,
result: { status: 'ERROR',
error: 'OAUTH-REQUEST',
data: JSON.stringify(err) + ' ' + oauth_token,
target: my.target }
});
return;
}
else {
cont_({ status: 'OK',
oauth_token: oauth_token });
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment