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

Lookup x.com urls using publish.twitter.com #537

Closed
wants to merge 1 commit into from

Conversation

jurasky
Copy link

@jurasky jurasky commented Jun 3, 2024

Now that Twitter is forcing more front-end urls to x.com, embedding x.com urls https:/x.com/API/status/1050118621198921728 can still use the https://publish.twitter.com/oembed endpoint.

Added x.com url matching to resources/oembed.php under 'https://publish.twitter.com/oembed'.

Also works equally well under its own x.com key. This strategy might be a little more future-proof if they ever fully move the developer tools over to x.com, but currently publish.x.com/oembed is just a redirect back to publish.twitter.com/oembed.

   'https://publish.x.com/oembed' => [
        '|^https?://x\\.com/.*$|i',
        '|^https?://x\\.com/.*/status/.*$|i',
        '|^https?://.*\\.x\\.com/.*/status/.*$|i',
    ],

Add x.com url matching to still be run through publish.twitter.com/oembed
@oscarotero
Copy link
Owner

Hi.
Sorry for the late reply.

Thanks for the PR, but the oembed entries are updated automatically by running composer update-resources.
I just run this command, you can see the diff: bcc0cc7

Will release a new version soon.

@oscarotero oscarotero closed this Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants