Sunday, 4 June 2017

How to get top trending topics of Twitter using Twitter API and pass it to a query parameter using Nodejs

I am new to Nodejs. I am trying to get the top trending topics on twitter and then use these to search and post tweets. I am using twit npm module and want to pass the retrieved trending topics to the q parameter in object params.

var params= { 
    q:' ', 
    result_type:'recent',
    lang:'en'
}

So later I can pass this variable in

Twitter.get('search/tweets',params,function(err,data) {
...}

and retweet them.



via r9k

No comments:

Post a Comment