6

How can I get tweet URL having only the tweet id?

I found a solution but I want to know if there is a better one. First, I assume you have to do a query and search after the tweet id obtaining the user name, and after that build the URL as follows:

https://twitter.com/{username}/status/{tweetid}.

Is this correct? Is there an easier solution which doesn't imply doing the query first?

9

You don't need the username.

Here's one of my tweets

https://twitter.com/edent/status/552767187694661632

If you replace my Twitter name (edent) with any other random name....

https://twitter.com/barackobama/status/552767187694661632

When you click on that link, Twitter will look up the Status ID and automatically redirect you.

So, don't bother doing the query, just stick any random name in there and it will still work.

7

you can try this one:

https://twitter.com/statuses/{tweetid}

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.