This is an example of a share URL provided to you from TikTok when you click the “Share Link” button from the share menu:
https://www.tiktok.com/t/ABCDE1gHIJk2/
When you click that link, it will redirect you to a link like this:
https://www.tiktok.com/@fakename/video/1234567890101112131?_r=1&_t=1aB2CDe3fG
It has some extra bits at the end, so let me show you it’s breakdown:
https://www.tiktok.com/@fakename/video/1234567890101112131
is the actual URL to the video you want to share. When you see a ?
at the end of the URL, you are entering into the parameter zone.
?_r=1&_t=1aB2CDe3fG
is not required to share the video, and it is the bit of data the app needs so it can present the popup you see after clicking the shared URL. When you click a shared URL a box appears before the video that says:
<Username> has shared you a video!
<Profile Image>
Do you want to watch & follow, or just watch?
[ Watch & Follow! ]
[ Watch ]
If your display name on TikTok is your whole name, well, everyone clicking the link now knows your name. If your TikTok username is a common username you use on the wider internet, well now you’ve linked that common username to the name you use here. If you’re posting videos on your account that show your face… you get the idea.
So what should I do?
When you click the share button and get the link, open it in your phone or computer’s browser first. Then, copy the part of the URL that is BEFORE the ?
and share that link. There are also TikTok privacy front ends for TikTok like ProxiTok. One easy way to provide those links instead of a direct link is to use Farside.link. You do so by adding https://farside.link/
to the front of the TikTok URL. Like this: https://farside.link/https://www.tiktok.com/@fakename/video/1234567890101112131
. Farside also works for things like Twitter, Reddit, Instagram, among others.
Anyway, hopefully this helps some people. Stay safe comrades.
But if you have to use regex use something like CleanURL’s providers json file. No need to reinvent the wheel and its crowd sourced.
Programming is all about finding the code other people wrote that does 90% of what you need then gluing it together by writing that last 10%. Unless you’re maintaining a library, in which case thank you for your service.