var request = require('superagent');
var Twit = require('twit');

var T = new Twit({
  consumer_key:         process.env.CONSUMER_KEY,
  consumer_secret:      process.env.CONSUMER_SECRET,
  access_token:         process.env.ACCESS_TOKEN,
  access_token_secret:  process.env.ACCESS_TOKEN_SECRET,
});

setInterval(function() { 
  request.get('http://randomword.setgetgo.com/get.php', function(res) {
    console.log(res.text);
  });
  // tweet random word
}, 1800000);
@@ -328,16 +328,21 @@
  request
+%0A    
 .get('ht
@@ -378,18 +378,27 @@
 get.php'
-, 
+)%0A    .end(
 function
@@ -398,16 +398,23 @@
 unction(
+error, 
 res) %7B%0A 
@@ -420,59 +420,279 @@
     
-console.log(res.text);%0A  %7D);%0A  // tweet random word
+  if(error) %7B%0A        return error;%0A      %7D else %7B%0A        T.post('statuses/update', %7B status: res.text %7D, function(err, data, response) %7B%0A          if(err) %7B%0A            return err;%0A          %7D else %7B%0A            return response;%0A          %7D%0A        %7D);%0A      %7D %0A    %7D);
 %0A%7D, 

tweet text