Twitter JS Tabletop setInterval forEach schedule

Multi tool use
Multi tool use


Twitter JS Tabletop setInterval forEach schedule



Looking to use tabletop to create a Twitter bot that sends out a tweet every 20 seconds from my Google sheet.



Problem - Each row has a different quote for the twitter bot to tweet every twenty seconds. It is currently taking every row and tweeting them all every 20 seconds. I want it to tweet one row every 20 seconds.



(Aware it's a very basic question but I've searched everywhere for the answer. Is it something to do with the data.forEach?)



Thanks,


setInterval(tweetIt, 1000*20);

tweetIt();

function tweetIt() {
Tabletop.init({
key: spreadsheetUrl,
callback: function naval(data, tabletop){
console.log(data);
data.forEach(function(d){
var status = d.URL + '';
bot.post('statuses/update', {status: status},
function(err, response, data){
if (err){
console.log(err);
}else{
console.log('posted!')
}
});
});

},
simpleSheet: true
});
}









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

VSXe5LK3NBYqZjhR6yB,s97JjHv1b7MaNgzGT
cGXfYCJAqhd,1xeKjjy5yIGZ,OceWsw1Dx6n7,V8QWEwZ

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications