var Twitter = require("twitter");

var variablesInPlace = true;

var twitterEnvironmentVariablesMissing = function() {
    variablesInPlace = false;

    console.log("You have not provided all environmental variables for the " +
        "Twitter to work properly. Please provide the following environmental " +
        "variables:");

    console.log(" TWITTER_CONSUMER_KEY", process.env.TWITTER_CONSUMER_KEY);
    console.log(" TWITTER_CONSUMER_SECRET", process.env.TWITTER_CONSUMER_SECRET);
    console.log(" TWITTER_TOKEN_KEY", process.env.TWITTER_TOKEN_KEY);
    console.log(" TWITTER_TOKEN_SECRET", process.env.TWITTER_TOKEN_SECRET);
};

// Super simple check to see that we have the environmental variables in place
if (process.env.TWITTER_CONSUMER_KEY === undefined ||
    process.env.TWITTER_CONSUMER_SECRET === undefined ||
    process.env.TWITTER_TOKEN_KEY === undefined ||
    process.env.TWITTER_TOKEN_SECRET === undefined) {

    twitterEnvironmentVariablesMissing();
}

// Using the environmental variables we make it fly
var client = new Twitter({
    consumer_key: process.env.TWITTER_CONSUMER_KEY,
    consumer_secret: process.env.TWITTER_CONSUMER_SECRET,
    access_token_key: process.env.TWITTER_TOKEN_KEY,
    access_token_secret: process.env.TWITTER_TOKEN_SECRET
});

var params = {
    screen_name: "mikaturunen"
};

var twitterReader = {
    read: function(mainWindow) {
        if (!variablesInPlace) {
            twitterEnvironmentVariablesMissing();
            // TODO send info to client
            return;
        }

        // Query twitter for feed information
        client.get("statuses/user_timeline", params, function(error, tweets, response) {
            if (error) {
                console.log();
                return;
            }

            console.log(tweets);
            mainWindow.webContents.send("tweets", tweets);
        });
    }
};

module.exports = twitterReader;

@@ -1787,21 +1787,152 @@
     
-console.log(t
+var textContentOfTweets = tweets.map(function(t) %7B return %7B text: t.text, user: t.user.screen_name %7D; %7D);%0A            console.log(textContentOfT
 weet
@@ -1986,16 +1986,29 @@
 eets%22, t
+extContentOfT
 weets);%0A

Parsing the tweet data a bit