btw, i don’t know how busy your forum is or how often x/twitter oneboxes are posted, but the basic free twitter plan does work for default oneboxes - it just rate limits to about 1 onebox request per 15 minutes. i have it running on a relatively busy forum and it only seems to limit when people try to post more than one onebox link in a post.
Unfortunately, i just discovered this stops a lot of YouTube (ie https://youtu.be/) from being embedded because the links redirect to YouTube.
People post far more YouTube links than they ever post X posts. So I’ve disabled for now and will simply edit x.com → twitter.com for now.
We very rarely have any x/twitter posts mentioned. And Twitter.com oneboxes do work, but X.com do not.
are you sure? i don’t mean this component, i mean the native onebox using a twitter developer free plan api token and with this component disabled. you say you are being hosted - they should be able to set up the default oneboxing like that exists here on Meta.
i have the rich x/twitter embedding for free on 2 different self hosted sites. i use this component when the x/twitter api breaks for whatever reason and just toggle it on and off as needed then.
I set up a developer free account for X. I am wondering how you get a Twitter one box for embedding?
I have the Native Twitter Embed component working fine, but I am wanting to post in dark mode.
It seems that on some recent Discourse versions, disabling Twitter/X oneboxes does not work well.
Also, this theme component does not work correctly on already existing oneboxes.
I have added some functionality that, in addition to replacing the bare links with a native embed, also looks for Twitter oneboxes, and then does the same thing.
That means there is no need to disable oneboxing or rebuild old posts any more.
Thank you! Sorry for the one-month delay. I was hospitalized and confined to bed at that time, and I have just been discharged and seen this PR. Merged!
Hi All… anyone having issues with this plug-in? It appears something broke and it is not showing embeds again either with x.com or twitter.com. Was there a new Discourse version that broke it?
Confirming this is still broken as of today (Sept 26, 2026).
On my instance the component now actively throws an error rather than just failing silently — Discourse shows the admin-only banner:
Posts may not be rendering correctly because one of the post decorators on your site threw an error. Caused by “Twitter/X Einbindung” [Twitter/X embed].
This keeps happening repeatedly and is triggering Safe Mode-style warnings site-wide, not just a missing embed. Discourse version: 2026.10.0.
Anyone found a fix or workaround beyond disabling the component entirely?
I will move to Nitter embeds after resolving some ipv6 issues on my provider and opt out completely from Twitter.
Ever since Musk drastically restricted API access due to ongoing bot spam, every form of external access to the platform has been suffering.
I can understand the business and security decisions, but not the lack of official options for external embedding.
I know Nitter, but it isn’t as convenient as copy & paste of original X links.
It might make sense for the Discourse project team itself to approach X Corp and offer an official plugin.
Otherwise, I honestly don’t see a future for interoperability here. And X is, without question, the most important news platform in the western world
Note that Nitter got a cease and desist letter last month and might not be around for much longer: X sends cease-and-desist to open source project Nitter over alleged scraping | TechCrunch
Seems legit. They erased tons of their data with no explanation or recovery, the interests behind are really dark.
The community project I linked is more alive than every. Codeberg, community driven.
Until X changes something and Zed is not there anymore to do the actual hard scraping work.
Well, the resistance resists until it is possible to resist. Autistic (Inventati) was working for humanity for decades until it was no longer possible to continue.
I think Nitter would be maintained for at least a year without further issues. They only push to massive services, and self-hosting does not have that impact.
Made a small fork of this component that fixes the safe-mode crash (unguarded null on a missing attribute) plus a couple of smaller issues: GitHub - terraboss/discourse-x-native-embed: X embedding · GitHub — working well so far, feedback appreciated.
Update: first milestone of my fork
Thanks for the feedback. My fork has kept the safe-mode banner away so far. My best guess for the cause is still a missing data-onebox-src attribute, but that isn’t confirmed, so please treat it as experimental.
Since then I’ve added a few things, some of them wished for earlier in this thread:
- the plain link above a tweet disappears once the tweet has loaded (it stays if X can’t be reached)
- less jumping while tweets load, and no duplicate embeds
- dark mode for embeds
- bare X links that Discourse didn’t onebox are embedded too
- quoting a post with an X link no longer replaces your quote with the tweet
All credit for the original idea goes to @Lhc_fl. The fork was built with some AI help from Claude. I’d be glad to hear how it works for others.
