Rishikant181 / Rettiwt-API

A CLI tool and an API for fetching data from Twitter for free!
https://rishikant181.github.io/Rettiwt-API/
MIT License
303 stars 31 forks source link

Get tweet URL #473

Closed Skydraw closed 4 months ago

Skydraw commented 4 months ago

HI,

I would like to know if it possible to get tweet URL in the fonction tweet.search ?

I found anything in src/models/data/Tweet.ts so it may be not implemented in the futur ?

Thanks you and have a nice day !

Rishikant181 commented 4 months ago

Tweet URL is not a field that is found in the raw data that is received from Twitter. However, the tweet url follows the syntax: https://x.com/<username>/status/<tweet_id>

The username and tweet id can be found from the details of the received tweet(s).

MDCYT commented 4 months ago

Or you can simply replace the username with an "i" (https://twitter.com/i/status/{id} or https://x.com/i/status/{id}) or any other username, Twitter/X ends up redirecting you to the correct tweet regardless if you put the correct username.

Example: https://twitter.com/i/status/20 or https://x.com/i/status/20

Skydraw commented 4 months ago

Hi ! THank you for your answers guys ! I finaly took this way !