Jump to content

How to embed Tiktok videos?


Feneroin

Recommended Posts

  • 1 month later...
1 hour ago, bfarber said:

Tiktok's oembed endpoint does not support that URL.

You'd have to do a request to the URL if it's "vm.tiktok.com". That will do a 301 redirect to the proper URL. The final URL is supported by the oEmbed endpoint.
image.thumb.png.94e9462c6c8d44e030b547ca009e136f.png

I don't see an immediate way to get the final URL from the response object, without trying to get it form the HTML response.

Link to comment
Share on other sites

  • 4 weeks later...
On 11/16/2020 at 5:22 PM, bfarber said:

When i share on TikTok this link:

https://vm.tiktok.com/ZSGk5RGo/

It show directly video embeded but not here and i still don't know how to get url 🙄

Because when i paste the url, it's converted to

https://m.tiktok.com/v/6705425749614005509.html

And don't work too here...

Link to comment
Share on other sites

3 hours ago, Morrigan said:

If you're using the app that's not particularly feasible.

Exactly.

And it's annoying because when i click 'Share', then 'copy link' and i paste on browser then i click "PC version" on my mobile Chrome then i see the real link for embed.

So at least 2x more time we spend on mobile using app.

 

 

As you see, when i paste directly copied link on twitter, it work.

Maybe IPS must try a little bit code change about TikTok embed...

Screenshot_20201211-212623~2.png

Edited by Feneroin
Link to comment
Share on other sites

  • 2 weeks later...
10 minutes ago, bfarber said:

It redirects to this URL


https://www.tiktok.com/@invictusmann/video/6856481534585605381?source=h5_m

Which embeds just fine

That's a lot of steps to do on mobile.

  1. Click "share"
  2. Copy link
  3. Go to browser
  4. Open a new tab.
  5. Paste link and wait for it to load
  6. Copy URL again
  7. Go to IPS site that you want it to be embedded on.
  8. Paste new URL.

The fun part is the above steps don't work on mobile because you get a mobile link like:

https://m.tiktok.com/v/6911023856178285829.html?_d=dkfgjhdkl;gu lkdfhjg lkdfhglkhsdfkjh

So basically its impossible to embed tiktok on mobile at the moment which does make it rather useless in its current form since the app is the primary way people view tiktok.

Link to comment
Share on other sites

1 hour ago, bfarber said:

It redirects to this URL




https://www.tiktok.com/@invictusmann/video/6856481534585605381?source=h5_m

Which embeds just fine

Not for me. I've TikTok app, it me redirect to app and i try with tab private on Google Chrome, the link don't change, always same:

https://m.tiktok.com/v/6856481534585605381.html

 

 

So how i embed it?

1- Copy share link on app

2- Open a private tab on browser

3- Paste the link

https://vm.tiktok.com/ZSW329cu/

4- Link is changing automatically to

https://m.tiktok.com/v/6856481534585605381.html

5- I change "m" to "www"

replace "v" with Tiktok User name

add "video/"

delete ".html"

and it's here:

https://www.tiktok.com/@invictusmann/video/6856481534585605381

 

Annoying, no? 😅

 

Edited by Feneroin
Link to comment
Share on other sites

We use oembed to embed a URL. You should perhaps reach out to TikTok and suggest that they support their own mobile URLs at their oembed endpoint, as we do not control the information supplied by them.

https://www.tiktok.com/oembed?url=https://www.tiktok.com/@invictusmann/video/6856481534585605381

and

https://www.tiktok.com/oembed?url=https://m.tiktok.com/v/6856481534585605381.html

work. Compare to 

https://www.tiktok.com/oembed?url=https://vm.tiktok.com/ZSW329cu/

which does not

 

Link to comment
Share on other sites

I've been looking at this recently...

vm.tiktok will return a 301 redirect, which then points to..

m.tiktok, with more detail in the URL - this then returns a 302 redirect, which then points to...

www.tiktok, with all the detail.

If tiktok change vm. to do what m. does then everybody happy!!!

Edited by Nathan Explosion
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...