Home Trying to get information in information from terminal into HTML
Reply: 0

Trying to get information in information from terminal into HTML

Eric Theofanis
1#
Eric Theofanis Published in 2018-02-14 09:54:29Z

Hi I'm using the function to connect to the twitter API. I'm running the function through Node and I am logging the desired results in terminal.

How do I get the data from Terminal to a file where I can link it to my html?

var params = { 
    q: 'movie tron', 
    count: 2
}; 

T.get('search/tweets', params, gotData); 

function gotData(err, data, response) {
 var tweets = data.statuses; 
    for (var i = 0; i < tweets.length; i++) {
        console.log(tweets[i].text); 
        console.log(tweets[i].created_at); 
        console.log(tweets[i].in_reply_to_screen_name); 
    } 
    // console.log(data); 
} 
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300895 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO