diff --git a/src/main/java/com/github/redouane59/twitter/TwitterClient.java b/src/main/java/com/github/redouane59/twitter/TwitterClient.java index 6907aec7..fef0c381 100644 --- a/src/main/java/com/github/redouane59/twitter/TwitterClient.java +++ b/src/main/java/com/github/redouane59/twitter/TwitterClient.java @@ -436,7 +436,7 @@ private TweetSearchResponse searchForTweets(String query, LocalDateTime fromDate parameters.put(NEXT_TOKEN, nextToken); } parameters.put("tweet.fields", URLHelper.ALL_TWEET_FIELDS); - Optional tweetSearchV2DTO = this.requestHelperV1.getRequestWithParameters(searchUrl, + Optional tweetSearchV2DTO = this.requestHelperV2.getRequestWithParameters(searchUrl, parameters, TweetSearchResponseV2.class); if (!tweetSearchV2DTO.isPresent() || tweetSearchV2DTO.get().getData() == null) { return new TweetSearchResponse(new ArrayList<>(), null);