-
Notifications
You must be signed in to change notification settings - Fork 662
Interacting with google
jhermsmeier edited this page Mar 20, 2012
·
3 revisions
var sys= require('sys');
var OAuth= require('oauth').OAuth;
oa= new OAuth("https://www.google.com/accounts/OAuthGetRequestToken",
"https://www.google.com/accounts/OAuthAuthorizeToken",
"anonymous", "anonymous",
"1.0A", "http://localhost:3000/oauth/callback", "HMAC-SHA1");
oa.getOAuthRequestToken({"scope":"http://www.google.com/calendar/feeds"},function(error, oauth_token, oauth_token_secret, results){
if(error) sys.puts('error :' + JSON.stringify(error))
else {
sys.puts('oauth_token: ' + oauth_token)
sys.puts('oauth_token_secret: ' + oauth_token_secret)
sys.puts('requestoken results: ' + sys.inspect(results))
sys.puts("Requesting access token")
}
});