I have a twiter web app that I am building. It is following a select group of twitter IDs and only picking out tweets that they post based on again a select group of keywords. Everything is working fine except I want to convert the twitter ID i have in an array into the corresponding twitter user name (one by one) so for example the array of IDs is var trackedHandles; and i want to convert trackedHandles[i] to a user name and print it the console next to the actual tweet. SO it would look like this in the console: @me: here is my tweet Here is my code selection that relates to this:
t.stream(
"statuses/filter",
{track: trackedHandles + trackedWords, lang: "en" },
function(stream) {
stream.on('data', function(tweet) {
for (var i= 0; i < trackedData.length; i++) {
if(tweet.text.indexOf(trackedData[i]) > - 1) {
// incriments added value to the word
redisClient.incr(trackedData[i]);
console.log(trackedHandles[i] + ":" + " " + tweet.text + " " );
//console.log(trackedData[i]);
}
}
});
}
);
Right now i'm just printing the twitter ID, but again I want to print the username. I appreciate your help.