Hello,
I have installed the npm_modules such Twit and i installed my config.js file in the same folder as my bot.js I am a coding noob and i really enjoy making bot but i am a little bit lost. I really hope that i could find help here.
My first problem seems to be a OAuth problem :
SyntaxError: Unexpected token ;
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
This is my code :
console.log("THE BOT IS STARTING");
var Twit = require('twit');
var config = require('./config.js');
var T = new Twit(config);
var stream = T.stream('user');
stream.on('follow', followed);
function followed(eventMsg);
var reply_to = tweet.in_reply_to_screen_name;
var text = tweet.text;
var from = tweet.user.screen_name;
var nameID = tweet.id_str;
var = params = {reply_to, text, from, nameID};
console.log(params);
if (reply_to === Dariuscrypto) {
var new_tweet = '@' + from +'Beep bop thanks for the follow !!';
var tweet = {
status: new_tweet
in_reply_to_status_id: nameID;
}
T.post('statuses/update', tweet, tweeted);
function tweeted(err, data, response) {
if (err) {
console.log("IM REALLY SORRY BUT SOMETHING WENT WRONG ");
} else {
console.log("It Wooooooorrrrrkksssss modafack")
tweeted();
}
}
}
I can see that many posts on this forum don’t have any answer so any help or links will be very appreciated.
Maybe my question is ridiculous, but please be indulgent this is very new for me. I can copy the code that i found on github but what i want is to understand it so i builded my own one. I start to understand a little how works the twitter API but i have so many questions without answers…
Thanks for reading me,
Darius