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
const client = new Twitter({ | |
consumer_key: process.env.TWITTER_CONSUMER_KEY, | |
consumer_secret: process.env.TWITTER_CONSUMER_SECRET, | |
access_token_key: process.env.oauthAccessToken, | |
access_token_secret: process.env.oauthAccessSecret, | |
}); | |
// after uploading the file and store it on the server using multer the path will be in (file.path) | |
const streamFile = fs.createReadStream(file.path, { highWaterMark: 128 * 1024 }); | |
function makePost(endpoint, params, counter) { | |
return new Promise((resolve, reject) => { |