Skip to content
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

Embed Block: Add support for x.com links #54042

Closed
cuemarie opened this issue Aug 29, 2023 · 3 comments · Fixed by #54876
Closed

Embed Block: Add support for x.com links #54042

cuemarie opened this issue Aug 29, 2023 · 3 comments · Fixed by #54876
Assignees
Labels
[Block] Embed Affects the Embed Block [Type] Enhancement A suggestion for improvement.

Comments

@cuemarie
Copy link

cuemarie commented Aug 29, 2023

What problem does this address?

Tying to use the https://x.com URL to embed tweets results in a text link only. Swapping the x.com for twitter.com does work to embed the tweet.

Originally requested here: Automattic/wp-calypso#81116

What is your proposed solution?

Add support for both URL versions to be embedded by the Embed block.

@BrookeDot
Copy link

Related Core Trac ticket: https://core.trac.wordpress.org/ticket/59142

@fluiddot
Copy link
Contributor

The Embed block relies on the oEmbed endpoint provided by WordPress. I checked the oEmbed implementation and seems that x.com URLs are not included, so embeds using that URL won’t be resolved using the Twitter/X oEmbed service (https://publish.twitter.com/oembed). I also checked the Twitter/X API for embeds, as well as the Twitter embed tool, and surprisingly it doesn’t resolve either using x.com URLs 🤔. I tried generating the embed code directly from a Tweet and it uses the twitter.com domain, so seems that for embeds we should still use that domain.

It’s not clear whether the Twitter oEmbed API will support x.com URLs, so in the meantime we could manually change the domain to twitter.com when requesting the embed as a workaround. Eventually, the x.com URLs should be supported in the WordPress oEmbed functionality.

@fluiddot
Copy link
Contributor

Following this comment, I opened #54876 with the shared proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Embed Affects the Embed Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants