WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 4 months ago

Last modified 3 months ago

#49083 closed enhancement (fixed)

Embeds: Add support for TikTok

Reported by: jblz Owned by: audrasjb
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Embeds Keywords: has-patch has-screenshots commit has-dev-note
Focuses: Cc:

Description

https://www.tiktok.com

It's unbelievably popular and currently not supported by the embed block. In fact, pasting a video URL at the beginning of a new block results in an "embed failed" notice like so:

https://cldup.com/GmfsQ5MDyJ-3000x3000.png


Developer facing documentation describes oembed functionality and advanced usage.

Adding support should be fairly straightforward on the core side by just adding the URL pattern & oembed link. We can separately add advanced support on the Gutenberg side for fine-tuning the block editor functionality if desired.

Attachments (2)

49083.diff (1.1 KB) - added by audrasjb 5 months ago.
Adds TikTok oEmbed
screencapture-localhost-8888-testing-features-test4-wp-admin-post-php-2019-12-27-11_48_18.png (301.2 KB) - added by audrasjb 5 months ago.
TikTok oEmbed rendering

Download all attachments as: .zip

Change History (22)

#2 @spacedmonkey
5 months ago

  • Keywords has-patch added
  • Version changed from trunk to 3.0

@jblz Thanks for your ticket. You may want to also open a ticket one gutenberg repo, so you can request a Tiktok block like other services.

@audrasjb
5 months ago

Adds TikTok oEmbed

#3 @johnbillion
5 months ago

  • Version 3.0 deleted

#4 @audrasjb
5 months ago

  • Keywords has-screenshots added
  • Milestone changed from Awaiting Review to 5.4
  • Owner set to audrasjb
  • Status changed from new to accepted

Thanks for the pull request on GitHub.
I prepared the patch for SVN and milestoned the feature for the next major.

I also made a pull request on Gutenberg GitHub Repository: https://github.com/WordPress/gutenberg/pull/19345

Cheers,
Jb

#5 @peterwilsoncc
5 months ago

  • Keywords reporter-feedback added

For the purpose of completeness could you please go through the checklist for whitelisting oEmbed providers, the basics are that they must

  • be well-established, popular, and mainstream services,
  • properly and fully implement the oEmbed specification,
  • and clearly be a trusted provider.

I haven’t looked into it but I would be surprised if they don’t meet the requirements.

#6 @audrasjb
5 months ago

Hi,

I'm not a user of the application, but here are some publicly available informations about this service:

Be well-established, popular, and mainstream services

As of 2018, TikTok is now available in over 150 markets, and in 75 languages. TikTok was downloaded more than 104 million times on Apple's App store during the full first half of 2018, according to data provided to CNBC by Sensor Tower, an app analytics platform based in San Francisco. It surpassed Facebook, YouTube and Instagram to become the world's most downloaded iOS app for that time period.

Source: https://en.wikipedia.org/wiki/TikTok#Evolution

Properly and fully implement the oEmbed specification

Documentation about oEmbed can be found here: https://developers.tiktok.com/doc/Embed

🔲 Clearly be a trusted provider

I'm not sure to fully understand how to ensure the provider is a trusted provider. Maybe the above link to the Wikipedia page could help?

#7 @jblz
5 months ago

Thanks for the elaboration on the requirements, @audrasjb.

I'm not sure to fully understand how to ensure the provider is a trusted provider. Maybe the above link to the Wikipedia page could help?

+1

I'm not sure how to fully establish trustworthiness in this sort of feature. Here's some points to consider:

I'm not sure that any of that qualifies them to provide unfiltered HTML, but it seems to have all the building blocks for a trustworthy service to me.

#8 follow-up: @jblz
5 months ago

  • Keywords reporter-feedback removed

Removing reporter-feedback tag. Please feel free to add it back if there are more questions or concerns.

#9 in reply to: ↑ 8 @peterwilsoncc
5 months ago

  • Keywords reporter-feedback added

Replying to jblz:

Removing reporter-feedback tag. Please feel free to add it back if there are more questions or concerns.

The full list of questions from the checklist linked to above still needs to be completed before they can be whitelisted.

Going through the list has highlighted potential problems in the past -- for example Github not implementing the oembed spec -- and being complete avoids favouring any one provider.

#10 @jblz
5 months ago

@peterwilsoncc, I'm not clear on what remains to establish from the checklist.

The comment above mine asserts that the first two items are sufficiently satisfied and I left some additional analysis on the third.

RE: oembed, the linked developer doc says:

The response format follows the specification of https://oembed.com

Is there a validation tool we need to subject it to or something like that?

Thanks!

#11 follow-up: @peterwilsoncc
5 months ago

@jblz

This is the full checklist, some of the questions have been answered above but others remain unanswered. Not everything needs a pass, but it does need to be documented as part of the ticket.

  • Is the service is popular enough for core developers to have heard of it before? Is it “mainstream?”
  • If similar services are already supported, how does this service compare in terms of size, features, and backing?
  • Does this service have a large following on Twitter, Facebook, or other social media? Is its Twitter account verified?
  • Is its oEmbed endpoint clearly established and properly documented? (Sometimes, they are just a developer’s pet project that may not be supported.)
  • Does the oEmbed endpoint work with WordPress’ oEmbed auto-discovery? If not, could it be made to work with additional HTML tags or attributes being whitelisted?
  • Does the service make an effort to build relationships with developers, such as through robust APIs?
  • How old is the service?
  • Does it have a well-established Wikipedia article? (Seriously.)
  • Has anyone written a WordPress plugin that leverages the service in some way, whether adding it as an oEmbed provider, creating a shortcode, or leveraging other APIs of the service? Do these plugins have any noticeable adoption or traction that would indicate usage and demand?
  • Is the provider frequently proposed?

Individually, these are all very anecdotal. But when considered holistically, it paints a pretty decent picture.

My gut instinct is TicTok ought to be added but part of the aim here is to have anecdotal data to indicate the whitelisting won't need to be deprecated in a few years.

Providing links where applicable will be helpful too.

#12 in reply to: ↑ 11 @felipeloureirosantos
4 months ago

Replying to peterwilsoncc:

Is the service is popular enough for core developers to have heard of it before? Is it “mainstream?”

Yes, it is. Their main public seems to be the younger generations, so that is something that might have made it not becoming so clear yet as most of those individuals are not part of the Make WordPress community, but that doesn't mean that they are not WordPress users and part of the general WordPress community somehow.

If similar services are already supported, how does this service compare in terms of size, features, and backing?

TikTok was the most downloaded app in the US in September 2018, it means it had more downloads than apps like Facebook and Youtube for this period of time.

Does this service have a large following on Twitter, Facebook, or other social media? Is its Twitter account verified?

Yes, both Twitter (US account) and Facebook are verified and have a huge number of followers. They also seem to have partnership with some Youtube creators.

How old is the service?

The initial release was 3 years ago, but it was a Musical.ly merger, and Musical.ly had the first release in August 2014.

Does it have a well-established Wikipedia article? (Seriously.)

Yes, it has a really great English page and it's available in several languages. I can see that both English (121 references) and Portuguese (52 references) versions have a lot information.

Has anyone written a WordPress plugin that leverages the service in some way, whether adding it as an oEmbed provider, creating a shortcode, or leveraging other APIs of the service? Do these plugins have any noticeable adoption or traction that would indicate usage and demand?

There is a plugin developed by @audrasjb: https://wordpress.org/plugins/embed-block-for-tiktok/

It has not significant installation numbers so far.

Is the provider frequently proposed?

No, it's not. I would guess the same intuition that I shared on the first question: TikTok users are not (yet) on the Make WordPress community.

#13 follow-up: @felipeloureirosantos
4 months ago

I was not able to answer those questions, but I suppose that the link provided by @audrasjb answer all these questions:

  • Is its oEmbed endpoint clearly established and properly documented? (Sometimes, they are just a developer’s pet project that may not be supported.)
  • Does the oEmbed endpoint work with WordPress’ oEmbed auto-discovery? If not, could it be made to work with additional HTML tags or attributes being whitelisted?
  • Does the service make an effort to build relationships with developers, such as through robust APIs?

#14 @peterwilsoncc
4 months ago

  • Keywords reporter-feedback removed

Thanks folks,

I appreciate you going through the formalities to help keep the supported services considered. Let's keep this on the milestone and monitor use of the plugin.

#15 in reply to: ↑ 13 @audrasjb
4 months ago

  • Keywords 2nd-opinion added

Replying to felipeloureirosantos:

I was not able to answer those questions, but I suppose that the link provided by @audrasjb answer all these questions:

  • Is its oEmbed endpoint clearly established and properly documented? (Sometimes, they are just a developer’s pet project that may not be supported.)
  • Does the oEmbed endpoint work with WordPress’ oEmbed auto-discovery? If not, could it be made to work with additional HTML tags or attributes being whitelisted?
  • Does the service make an effort to build relationships with developers, such as through robust APIs?

Yes I can confirm the link shared above answers those questions.
@peterwilsoncc: WP 5.4 beta 1 is planned in a couple of days. Are you ok to tag this ticket for commit? If not I think we should move it to 5.5.
As @felipeloureirosantos noticed, I made an (unofficial) feature plugin: https://wordpress.org/plugins/embed-block-for-tiktok/ to see if there is a need for this embed. It has 50+ active installations which is pretty low. But I think there is a bunch of core embeds with low usage. As core committer, it's up to you to validate this for commit in 5.4 or not :-)

#16 @peterwilsoncc
4 months ago

  • Keywords commit added; 2nd-opinion removed

Yes, I’m happy if it goes in.

I’ve asked the editor team if 5.4 leaves enough time for the editor changes too.

https://github.com/WordPress/gutenberg/pull/19345#issuecomment-583783085

This ticket was mentioned in Slack in #core-editor by peterwilsoncc. View the logs.


4 months ago

#18 @SergeyBiryukov
4 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 47216:

Embeds: Add support for TikTok.

Props audrasjb, jblz, peterwilsoncc, felipeloureirosantos.
Fixes #49083.

#19 @audrasjb
4 months ago

  • Keywords needs-dev-note added

#20 @audrasjb
3 months ago

  • Keywords has-dev-note added; needs-dev-note removed
Note: See TracTickets for help on using tickets.