Created
September 15, 2017 14:10
-
-
Save adityathebe/778d88d60790c6537b13537c82b63e5a to your computer and use it in GitHub Desktop.
Twitter Bot Tutorial - function that tweets !
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 TWIT = require('twit') | |
const config = require('./config'); | |
var Twit = new TWIT(config); | |
function makeTweet(tweet) { | |
Twit.post('statuses/update', { status: tweet }, function(err, data, response) { | |
if(err) { | |
console.log(err) | |
} else { | |
console.log("Tweet Made Successfully") | |
} | |
}); | |
}; | |
tweet("I am tweeting from my command line and it's awesome"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment