sferik / twitter-ruby

A Ruby interface to the Twitter API.
http://www.rubydoc.info/gems/twitter
MIT License
4.58k stars 1.31k forks source link

For the search, when the result_type is "popular", count is ignored #897

Closed ardaasln closed 1 year ago

ardaasln commented 6 years ago

I am using twitter 6.2.0. I am getting 100 results in the following code snippet:

options = {:result_type => "mixed", :count => 100}
result = @client.search(params, options)

For the following I am getting only 15 results which is the default count:

options = {:result_type => "popular", :count => 100}
result = @client.search(params, options)

Why "popular" attribute is ignoring the count?

andypiper commented 6 years ago

It's a bug in the Twitter standard Search API. "popular" only ever supports a maximum of 15 results. Other options ("mixed" and "recent") support up to 100 at a time.

ardaasln commented 6 years ago

I have actually managed to fetch 100 "popular" tweets via npm library in my NodeJS app. I thought it has something to do with this particular ruby library.