I'm trying to get a twitter bot to tweet quotes from a text file but I don't know where to start, I managed to get it to tweet with a sentence but now I want to try have a list with quotes for it to tweet at set intervals, cany help would be appreciated, below is the code I used. Do i need to put in something that would link back to a file and what file would I need, text, csv?
console.log('The bot is starting');
var Twit = require('twit');
var config = require('./config');
var T = new Twit(config);
var tweet = {
status: 'The F1 Pit Wall Test'
}
T.post('statuses/update', tweet, tweeted);
function tweeted(err, data, response) {
if (err) {
console.log("Something went wrong!");
} else {
console.log("It worked!");
}
}
I had a look online but can't find anyone doing it using node, cmd and js.