elephant-bird
elephant-bird copied to clipboard
Why using /2/users/by/username/:username for getting user tweets
I created a question in the Twitter forum for a discordance between rate limit in the documentation and rate limit in the API. See here.
But here, my question is for you.
My code for getting tweets same as documentation :
$twitter_name = "elonmusk";
$twitter_user = $twitter->user($twitter_name)->tweets($params);
And the called API URL is : GET https://api.twitter.com/2/users/by/username/elonmusk
So why are you using GET /2/users/by/username/:username
for getting a user tweet instead of GET /2/users/:id/tweets
?
I'm asking because maybe the discordance seen above is only for GET /2/users/by/username/:username
and not for GET /2/users/:id/tweets
.
Thanks for your feedback.