# X embed not working on local instance

**URL:** <https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014>\
**Category:** Using Ghost\
**Created:** [March 11, 2025, 4:32pm UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014 "2025-03-11T16:32:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Sim](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/christopher_sim/32/30424_2.png) [@Christopher\_Sim](https://forum.ghost.org/u/Christopher_Sim)\
**Post date:** [March 11, 2025, 4:32pm UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/1 "2025-03-11T16:32:11Z")

</div>

Running 5.111 locally on Sequoia trying to embed X post but it gives a 422 console error. It was working with 5.86 a month or so ago. I looked at X embed feature and it seems broken on twitter.publish. Is this a known issue as I couldn’t find anything for this year or last year relevant here. Same for Facebook the ghost docs say it just works but trying to get it to embed FB post too gives similar error. ghost cli 1.27 ghost 5.111 ghost doctor clean bill. Thanks 👍

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [March 11, 2025, 4:43pm UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/2 "2025-03-11T16:43:33Z")

</div>

Have you checked your Ghost logs to see if there are more details about the failure in the server logs?

---

<div class="post-metadata">

**Author:** ![Christopher\_Sim](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/christopher_sim/32/30424_2.png) [@Christopher\_Sim](https://forum.ghost.org/u/Christopher_Sim)\
**Post date:** [March 12, 2025, 10:13am UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/3 "2025-03-12T10:13:13Z")

</div>

Thanks will take a look at the logs. So it should work?

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [March 12, 2025, 1:50pm UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/4 "2025-03-12T13:50:13Z")

</div>

Yes, it should work by pasting the Twitter/Facebook post’s URL into the editor.

If both are failing then it’s worth checking your network setup to ensure your Ghost instance is able to make outgoing requests.

---

<div class="post-metadata">

**Author:** ![Christopher\_Sim](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/christopher_sim/32/30424_2.png) [@Christopher\_Sim](https://forum.ghost.org/u/Christopher_Sim)\
**Post date:** [March 12, 2025, 5:02pm UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/5 "2025-03-12T17:02:29Z")

</div>

Thanks

The twitter embed has just started working again the facebook is giving a 400 error (bad request) this is trying to embed the ghost facebook post at [Ghost](https://www.facebook.com/ghost/posts/660480676191579)

[2025-03-12 16:56:24] ERROR “GET /ghost/api/admin/oembed/?url=https%3A%2F%[2Fwww.facebook.com](http://2Fwww.facebook.com)%2Fghost%2Fposts%2F660480676191579” 422 213ms

Unable to fetch requested embed.

“Request failed with error code 400”

Error ID:  
eec0def0-ff62-11ef-8f71-930d87810d72

* * *

ValidationError: Unable to fetch requested embed.  
at OEmbedService.knownProvider (/Users/admin/Projects/GhostCMS/versions/5.111.0/core/server/services/oembed/OEmbedService.js:123:19)  
at process.processTicksAndRejections (node:internal/process/task\_queues:95:5)  
at async getResponse (/Users/admin/Projects/GhostCMS/versions/5.111.0/node\_modules/@tryghost/api-framework/lib/pipeline.js:259:34)  
at async ImplWrapper (/Users/admin/Projects/GhostCMS/versions/5.111.0/node\_modules/@tryghost/api-framework/lib/pipeline.js:264:30)  
at async Http (/Users/admin/Projects/GhostCMS/versions/5.111.0/node\_modules/@tryghost/api-framework/lib/http.js:70:28)

But I can use an HTML embed to the same URL and it works so my ghost system can see the endpoint. So I can use FB embed code but the oembed API doesn’t seem to be working I’m wondering if there is more I need to do to get the oembed API to work?

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [March 12, 2025, 5:09pm UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/6 "2025-03-12T17:09:37Z")

</div>

> [@Christopher\_Sim](#):
>
> But I can use an HTML embed to the same URL and it works so my ghost system can see the endpoint

Using HTML to embed bypasses Ghost seeing anything so that doesn’t prove your system can reach the endpoint.

There shouldn’t be anything more you need to do to get the oembed API to work so outside of network related things preventing the Ghost-\>Facebook request I’m not sure what the issue could be.

> I looked at X embed feature and it seems broken on twitter.publish

What do you mean by `twitter.publish` here?

---

<div class="post-metadata">

**Author:** ![Christopher\_Sim](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/christopher_sim/32/30424_2.png) [@Christopher\_Sim](https://forum.ghost.org/u/Christopher_Sim)\
**Post date:** [March 13, 2025, 11:56pm UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/7 "2025-03-13T23:56:43Z")

</div>

Thanks, yes its not going through ghost but what I meant was it showed that the URL was valid and public so ghost could embed it.

twitter.publish is what twitter used to embed posts - I think the problem was at the twitter end as it just sprang into life/startedvworking with no changes to ghost.

I was looking at [oEmbed - Documentation - Meta for Developers](https://developers.facebook.com/docs/plugins/oembed/) and wondering if a local version of ghost is approved/authorised. I will just have to use the old HTML embed method as a workaround.

---

<div class="post-metadata">

**Author:** ![Cthulhu\_Chaos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cthulhu_chaos/32/35259_2.png) [@Cthulhu\_Chaos](https://forum.ghost.org/u/Cthulhu_Chaos)\
**Post date:** [April 15, 2025, 7:23am UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/8 "2025-04-15T07:23:52Z")

</div>

I thought meta deprecated their old oembed end point for authorised apps only. I saw another post here that new Facebook embeds would stop working while old ones still work as the code is already in ghost, isn’t that still the case. I will link that post when I find it.

---

<div class="post-metadata">

**Author:** ![Cthulhu\_Chaos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cthulhu_chaos/32/35259_2.png) [@Cthulhu\_Chaos](https://forum.ghost.org/u/Cthulhu_Chaos)\
**Post date:** [April 15, 2025, 7:25am UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/9 "2025-04-15T07:25:08Z")

</div>

> [@Facebook and Instagram embeds will be alright after Oct 24?](https://forum.ghost.org/t/facebook-and-instagram-embeds-will-be-alright-after-oct-24/17790/4):
>
> if anyone is interested, instagram can be integrated easily like this:

---

<div class="post-metadata">

**Author:** ![Cthulhu\_Chaos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cthulhu_chaos/32/35259_2.png) [@Cthulhu\_Chaos](https://forum.ghost.org/u/Cthulhu_Chaos)\
**Post date:** [April 18, 2025, 12:42pm UTC](https://forum.ghost.org/t/x-embed-not-working-on-local-instance/56014/10 "2025-04-18T12:42:25Z")

</div>

Update that linked article states a non developer account won’t work and you need an API key. I got FB embeds to work manually without a developer account but using the Facebook emded post tool advanced settings and pasting their code into an HTML card. I assume the API does the same thing. I used code injection to reference their JS library required for it to work and I now get adaptive Facebook posts. It definitely sets third party tracking cookies so be aware of that.
