Sunday, 16 April 2017

Twitter npm package - how to apply multiple query parameters

As I found out in this post (link) Twitter Search API allows to exclude certain types of tweets like retweets or tweets that contain links in them.

How could this be applied to the Twitter npm package (link)?

For example:

client.get('search/tweets', {
  q: 'some query',
  exclude: 'retweets',
  exclude: 'links'
}, function(error, tweets, response) {
  console.log(tweets);
});

This request would only consider the last parameter - exclude: 'links'



via niceman

No comments:

Post a Comment