xdevplatform / Twitter-API-v2-sample-code

Sample code for the Twitter API v2 endpoints
https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api
Apache License 2.0
2.66k stars 984 forks source link

User timeline API is not returning the right results #93

Open teshnizi opened 2 years ago

teshnizi commented 2 years ago

Describe the bug I'm trying to pull the timeline for @Forbes from 2022-04-19 to 2022-05-19. The url I'm sending the requests to is as follows:

"https://api.twitter.com/2/users/Forbes/tweets?max_results=100&start_time=2022-04-19T00:00:00Z&end_time=2022-05-19T00:00:00Z"

The returned response is as follows:

{ "meta": { "result_count": 0 } }

However, there are some tweets in that period, including this one: https://twitter.com/Forbes/status/1518671125563199492

When I change the user ID (For example to "CNN"), it works just fine.

To Reproduce Go to Twitters Public Workspace on Postman, set your bearer token, and send the following request:

image

Additional context I tried different methods (python code on my laptop, postman, python code on google colab). I tried two different bearer auth tokens. Still getting the same empty response.