• Why can’t the Twitter tweets be embedded? The same issue is encountered on our website.

    To check if the issue is with us or on every other WordPress site, we tried WordPress demo playground – and even Tweets are not getting embedded there.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • @lehren

    Can you provide more information about what you were trying to embed and the version of WordPress you are using?

    I tested and when I tried to embed a tweet, it worked right out of the box without any issues in a WordPress blog, here’s the screenshot:

    Thread Starter lehren

    (@lehren)

    As soon as we try to embed any tweet it returns “Sorry, this content could not be embedded.”

    Using WordPress 6.2.2.

    To our surprise, it is also not working on other installations like https://developer.wordpress.org/playground/demo

    Can you please share the link of the tweet, so I can try embedding on one of my test sites running WordPress 6.2.2 and see if the issue is specifically with that tweet?

    About playground demo, it’s experimental and things may or may not work correctly in there.

    Thread Starter lehren

    (@lehren)

    We just tried with one – https://twitter.com/elonmusk/status/1662292805312495618

    At least 6 of our sites are experiencing the same issue from last 3 days.

    We understand that the demos may be experimental but then we tried an alternate test link – https://www.softaculous.com/demos/WordPress and the tweets do not get embedded here, return the same issue.

    @lehren

    Thanks for providing the link to the twitter post you’re trying to embed.

    Since you mentioned the issue is happening on your site, I tried it on different websites hosted on different platforms and locations.

    Apparently, on some of the sites its working fine, and on others its not.

    I dig a bit deeper and looked for possible issues, turns out, Twitter API for oEmbed is returning “Method Not Allowed” (header 405) when requested from some of the servers while returning the correct response for others. So I’d say, nothing is wrong at the WordPress end, but its Twitter API that’s refusing to serve some servers, while allowing others.

    To give you an idea about how oEmbed works, WordPress makes an API request to the service whose URL is going to be embedded, then based on response, the HTML markup is generated, but if those services do not respond or give any errors, WordPress cannot generate the HTML markup and gives you an error without stating what exactly happened.

    Would be great if you can contact Twitter support for this, asking why your server’s IP is not receiving the responses while other IPs are.

    Thread Starter lehren

    (@lehren)

    For us it is sometimes error 401 else 404 for oembed API requests when we inspect it under the browser debugger console while working on the block editor.

    We will try to reach out to twitter, lets see how it goes.

    @gagan0123 – thanks for contributing to this thread.

    @lehren

    Thanks for the follow up 🙂

    I also tried reaching out to Twitter, but where there used to be contact forms for support, now only article links are there and no form to be found on their contact us page.

    Keeping track of your request on Twitter Developers site

    Daniel P.

    (@danidub)

    I solved this problem by switching the domain x.com for twitter.com in the link and it worked without any fails 💪

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Twitter Embeds Failing’ is closed to new replies.