when i run my twitter function through node, i get back no errors, but nothing will load, the twitter account is a dummy but i have 4 tweets in it and the user is @Ian_aromin, so not sure whats going on, I even replaced my code with the solution and the same thing still happens.
I am exporting my twitter key info, but I won't post it, I assume thats not the issue, because I have tried it with the code inside the same file and the same issue persists.
//function to run twitter npm
function twitter() {
var client = new Twitter(keys.twitterKeys);
var params = {screen_name: 'Ian_aromin'};
//grabbing the exports api info from other .js and running a get
client.get('statuses/user_timeline', params, function(error, tweets, response) {
if (!error) {
for (var i = 0; i < tweets.length; i++) {
console.log(tweets[i].created_at);
console.log("");
console.log(tweets[i].text);
}
}
});
}
via Christian A
No comments:
Post a Comment