How to use the oauth.get function in oauth

To help you get started, we’ve selected a few oauth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EventSense / EventSense / server / helpers.js View on Github external
exports.getMentions = function(req, res, callback){
  callback = callback || analyzeTweets;
  oauth.get(
    'https://api.twitter.com/1.1/statuses/mentions_timeline.json?count=800',
    process.env.ACCESS_TOKEN_KEY, 
    process.env.ACCESS_TOKEN_SECRET,             
    function (e, data, res){
      if (e) return console.error(e);
      callback(data);
      // res.send(200,'tweets obtained!')
    });    
}