New API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var OAuth2 = require('OAuth').OAuth2; | |
var https = require('https'); | |
var oauth2 = new OAuth2(KEY, SECRET, 'https://api.twitter.com/', null, 'oauth2/token', null); | |
oauth2.getOAuthAccessToken('', { | |
'grant_type': 'client_credentials' | |
}, function (e, access_token) { | |
console.log(access_token); //string that we can use to authenticate request | |
var options = { |