Twitter Native Embed

Yes, I do blocked Twitter.com and x.com
But the native embed tweet is not showing. Instead the discourse embed tweet is showing without picture and video.

The plugin works on my old site with 3.2.0 but not new site with 3.3.0

After I edited the post itself. it works. interesting.

2 Likes

After updating Discourse, it seems that this component is broken again.

Anyone experience this, and find a work around?

I also have the same problem. This component does not work on my discourse version 3.5.0.beta9-dev. Anyone can help ? Thanks.

Come here to say the same. This component is borked.

This theme component still works on my absolutely latest forum.

It’s not broken. Maybe we can check if there’s a configuration error?

2 Likes

Still working fine on my Discourse too (also running latest).

running fine here too on latest discourse

I forked the repo, and got it sort of working (it posted the same tweet like 8 times), but just reverted back to your component. Either way, still can’t get it to work; also turned off virtually all components to no avail.

This component works fine in my old 3.4.6 version forum. Same exact configuration. But it doesn’t work on version 3.5.0.beta9-dev

I’ve just updated to 3.5.0.beta9-dev and it still seems to be working here. Not much help I know, but I don’t think Discourse is the problem.

Twitter previews were working without this solution for us at least up to a couple of weeks ago. Not really sure if the break was tied to the new version or not. Is this still the accepted way of ensuring previews of twitter links are working?

I tried installing the plugin and configuring it as instructed but ran into a roadblock.

When I tried to add https://platform.twitter.com to the content security policy script src setting, I get the following error:

An error occurred: content_security_policy_script_src: Value must be either 'unsafe-eval' or 'wasm-unsafe-eval', or in the form '-' where supported hash algorithms are sha256, sha384 or sha512. Ensure that your input is wrapped in single quotation marks.

Hi All… just checking to see if this has been resolved or figured out yet?

Currently running 3.5.2 and if you use x.com it does not work, but if you change it to twitter.com it works!

1 Like

setting “Block onebox on redirect” fixed it for me

1 Like

Same here. It would be nice if x.com worked, but at least this is still a valid workaround in December 2025.

@ZeroDean

if you block x.com oneboxes with Blocked onebox domains, then enable Block onebox on redirect the compoent should work (i just tested it on a self-hosted site):


4 Likes

Thank you @Lilly ! I especially appreciate the instructions/visual.

Appears to work on new posts. Doesn’t seem to impact old posts (odd). But maybe it’s a cache thing. I’ll find out later.

Thanks again.

You can clear the cache and rebake in rails like this (probably a good idea to take a backup first).
Or you can wait 24 hours for the onebox cache to expire.

# Enter Rails console
./launcher enter app
rails c
# From Rails console

# 1. Clear onebox cache from Redis
Discourse.redis.keys("*onebox*").each { |key| Discourse.redis.del(key) }

# 2. Rebake posts with twitter.com
Post.where("raw LIKE ?", "%twitter.com%").find_each { |post| post.rebake! }
4 Likes

Thank you @Lilly . I’m currently hosted, so no rails access for me. I have no issues waiting 24 hours. But definitely good to know! :raising_hands:

2 Likes