ciaranj / node-oauth

OAuth wrapper for node.js
MIT License
2.44k stars 660 forks source link

Oath #360

Open bellebradley93 opened 2 years ago

bellebradley93 commented 2 years ago

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();
});
}); });