Can you display tweets of somebody else or is it just the account that you got the key and secret… etc details from?
I’m checking the params in GET statuses/user_timeline docs and I don’t think I can!
I’m trying to build an app that allows you to display tweets by inputting a username of any account. Thanks you.
3
Answers
This will only work for the user who has authenticated and is now using your app, as well as the users that they follow.
This is directly from the link you posted.
To get tweets from a specific user you will want to use the GET statuses/user_timeline API method.
Just add
?screen_name=USERNAME
at the end of the endpoint. For exampleThis method can only return up to 3,200 of a user’s most recent Tweets.
You can display another user’s tweets even if you are not using their credentials. Basically, you can display anyone’s public tweets if you know their screen name. This is the Twitter api request: https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline