ciaranj / node-oauth

OAuth wrapper for node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Oath

bellebradley93 opened this issue · comments

describe('OAuth1.0',function(){
var OAuth = require('oauth');

it('tests trends Twitter API v1.1',function(done){
var oauth = new OAuth.OAuth(
'https://api.twitter.com/oauth/request_token',
'https://api.twitter.com/oauth/access_token',
'your application consumer key',
'your application secret',
'1.0A',
null,
'HMAC-SHA1'
);
oauth.get(
'https://api.twitter.com/1.1/trends/place.json?id=23424977',
'your user token for this app', //test user token
'your user secret for this app', //test user secret
function (e, data, res){
if (e) console.error(e);
console.log(require('util').inspect(data));
done();
});
});
});