jamiemaguiredotnet/SocialOpinion-Public

SearchTweets methods are ignoring maxResults parameter.

Opened this issue · 1 comments

Describe the bug
SearchTweets ( in RecentSearch service ) methods ignores maxResults parameter.

To Reproduce
List<RecentSearchResultsModel> result = _searchService.SearchTweets(query, 10, 5); return result;

Expected behavior
Should return 10 tweets by default. Or if given maxResults parameter is let's say 20, api should return 20 etc.
According to docs, default is 10, not 100;
"The max_results request parameter enables you to configure the number of Tweets returned per response. This defaults to 10 Tweets and has a maximum of 100. " -> https://developer.twitter.com/en/docs/twitter-api/tweets/search/integrate/paginate

Screenshots
Screenshot from 2021-08-31 06-17-01

Additional context

response = client.GetTweets(query, "", "", "", "", _defaultTweetsPerPage, nextToken, _expansionsFields, _TweetFields, _MediaFields, _PlaceFields, _PollFields, _UserFields);

response = client.GetTweets(query, "", "", sinceid, untilid, _defaultTweetsPerPage, nextToken, _expansionsFields, _TweetFields, _MediaFields, _PlaceFields, _PollFields, _UserFields);

Thanks for the feedback. I will resolve this.