-
Notifications
You must be signed in to change notification settings - Fork 555
Open
Description
Does anyone know how I tweet from another JS File ?
My index file looks likes this:
console.log('Starting');
var Twit = require('twit');
var config = require('./config');
var T = new Twit(config);
var tweet = {
status:'Hello World',
}
T.post('statuses/update', tweet, tweeted);
function tweeted(err, data, response) {
if (err) {
console.log("Something went wrong!");
} else {
console.log("It worked!");
}
I'm new to this and all I want to do is say tweet from another js file called tweets that say has a list of tweets in it like the below:
'This is a test tweet'
'This is a test tweet 2'
'This is a test tweet 3'
and I want it to tweet them from top to bottom and also with an interval say like every hour.
Can anyone help with this ?
Thanks
Metadata
Metadata
Assignees
Labels
No labels