-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tiktok embed support - Something for the plugin, or custom scripting? #4326
Comments
Thanks for the report. Since WordPress now has direct support for TikTok, it's something that the AMP plugin should be directly supporting as well. Nevertheless, in the current version of WordPress I'm not able to embed a TikTok embed in the block editor: So is this working for you? If so, how? This will be the prerequisite, which I know will for sure will be coming in WordPress 5.4, but I'm curious how you are seeing it work now. I don't believe an Example TikTok URL: https://www.tiktok.com/@scout2015/video/6718335390845095173 Example embed code: <blockquote class="tiktok-embed" cite="https://www.tiktok.com/@scout2015/video/6718335390845095173" data-video-id="6718335390845095173" style="max-width: 605px;min-width: 325px;">
<section><a target="_blank" title="@scout2015" href="https://www.tiktok.com/@scout2015">@scout2015</a>
<p>Scramble up ur name & I’ll try to guess it😍❤️
<a title="foryoupage" target="_blank" href="https://www.tiktok.com/tag/foryoupage">#foryoupage</a>
<a title="petsoftiktok" target="_blank" href="https://www.tiktok.com/tag/petsoftiktok">#petsoftiktok</a>
<a title="aesthetic" target="_blank" href="https://www.tiktok.com/tag/aesthetic">#aesthetic</a></p>
<a target="_blank" title="♬ original sound - 𝐇𝐚𝐰𝐚𝐢𝐢𓆉" href="https://www.tiktok.com/music/original-sound-6689804660171082501">♬
original sound - 𝐇𝐚𝐰𝐚𝐢𝐢𓆉</a></section>
</blockquote>
<script async src="https://www.tiktok.com/embed.js"></script> What is needed here is an |
Support for Tiktok embeds will be available in WordPress 5.4, and can be tested for by using any of the 5.4 betas. This is also related to #4286, with the addition of the Tiktok embed block in Gutenberg. |
Here's the iframe that's generated from https://www.tiktok.com/@scout2015/video/6718335390845095173: <iframe name="__tt_embed__v37580789727738020" src="https://www.tiktok.com/embed/v2/6718335390845095173?lang=en-US" style="width: 580px; height: 0px; display: none; visibility: hidden;" data-origwidth="" data-origheight=""></iframe> One thing to note is that the iframe |
What I have working is the That's how TikTok recommends users do it, so really that's what my users are going to do and that's what I need to support (though of course supporting the full oEmbed version is good too). The other reason I prefer the I'm not sure if that causes problems for AMP or not, but I suspect it might be part of the reason for the amp-twitter script (to make sure it's loaded in the AMP way and not relying on the blockquote and script tag being next to each other). |
@jerclarke Please test this build: #4357 (comment) |
Note that the implementation is not perfect. It's about as good as it's going to get until AMP has specific support for TikTok (or better TikTok directly supports |
Testing instructions:
|
Verified in QA |
Hello guys, I'm jumping here with a possible alternative to use amp-iframe component, I used and worked for me. |
@carloshhr ok? So what is it? |
Apologies😅, I used this amp tag https://amp.dev/documentation/components/amp-embedly-card/ |
Wow, yes, you're right! This totally should have used |
Filed issue here: #4633. |
Feature description
Tiktok has an embed code and oEmbed endpoint that works with core WP, but so far it does nothing in AMP and I can't find anyone on the internet talking about the issue.
What's the right approach for me to take if I want to support it? Wait for an
amp-tiktok
script like the Twitter/Instagram ones?Should I be trying to support their iframe directly somehow?
Thanks for any feedback. Sorry if the question doesn't belong here. I realize there's a never-ending list of potential embeds for AMP to support, just trying to figure out if this one is a reasonable goal for one person to tackle, or if I should just forbid my users from embedding Tiktok until AMP supports it (if they ever do).
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: