Created
June 15, 2020 21:03
-
-
Save hammertoe/68966e80b3e2ac7e6c77601143282360 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
app.get('/tweets', | |
require('connect-ensure-login').ensureLoggedIn(), | |
function(req, res) { | |
var T = new Twit({ | |
consumer_key: process.env['TWITTER_CONSUMER_KEY'], | |
consumer_secret: process.env['TWITTER_CONSUMER_SECRET'], | |
access_token: req.user.token, | |
access_token_secret: req.user.tokenSecret, | |
timeout_ms: 60*1000, // optional HTTP request timeout to apply to all requests. | |
strictSSL: true, // optional - requires SSL certificates to be valid. | |
}) | |
T.get('statuses/home_timeline', { count: 20, | |
tweet_mode: 'extended' }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment