# Twitter Native Embed

**URL:** https://meta.discourse.org/t/twitter-native-embed/261792
**Category:** Theme component
**Created:** [April 15, 2023, 12:35pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792 "2023-04-15T12:35:49Z")
**Posts on this page:** 20
**Page:** 5

<div class="post-metadata">

### Author: ![Yt.w](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yt.w/32/348367_2.png) [@Yt.w](https://meta.discourse.org/u/Yt.w)
#### Post date: [August 14, 2024, 8:01am UTC](https://meta.discourse.org/t/twitter-native-embed/261792/81 "2024-08-14T08:01:52Z")

</div>

Yes, I do blocked [Twitter.com](http://Twitter.com) and [x.com](http://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

---

<div class="post-metadata">

### Author: ![Yt.w](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yt.w/32/348367_2.png) [@Yt.w](https://meta.discourse.org/u/Yt.w)
#### Post date: [August 14, 2024, 12:54pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/82 "2024-08-14T12:54:30Z")

</div>

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

---

<div class="post-metadata">

### Author: ![SPJohn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/spjohn/32/446429_2.png) [@SPJohn](https://meta.discourse.org/u/SPJohn)
#### Post date: [April 6, 2025, 8:41pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/83 "2025-04-06T20:41:31Z")

</div>

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

Anyone experience this, and find a work around?

---

<div class="post-metadata">

### Author: ![Jack123](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@Jack123](https://meta.discourse.org/u/Jack123)
#### Post date: [August 20, 2025, 3:39am UTC](https://meta.discourse.org/t/twitter-native-embed/261792/84 "2025-08-20T03:39:16Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ncaming215](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ncaming215/32/205701_2.png) [@ncaming215](https://meta.discourse.org/u/ncaming215)
#### Post date: [August 23, 2025, 6:18pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/85 "2025-08-23T18:18:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [August 24, 2025, 1:40am UTC](https://meta.discourse.org/t/twitter-native-embed/261792/86 "2025-08-24T01:40:22Z")

</div>

This theme component still works on my absolutely latest forum.

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

> [@Twitter Native Embed](https://meta.discourse.org/t/twitter-native-embed/261792/28):
>
> Alright +1. I tested, and if oneboxes don’t work well (like, not showing media), then you must add twitter.com in blocked onebox domains in order for the component to work. slight_smile From: To: I didn’t use the theme component widely and didn’t encounter the issue, but my guess is that Discourse doesn’t know how tall will be a Twitter iframe before the content is loaded. When the iframe loads, it pushes the content arround it, creating this behavior. Can you captu…

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [August 24, 2025, 8:37am UTC](https://meta.discourse.org/t/twitter-native-embed/261792/87 "2025-08-24T08:37:38Z")

</div>

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

---

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [August 24, 2025, 8:41am UTC](https://meta.discourse.org/t/twitter-native-embed/261792/88 "2025-08-24T08:41:53Z")

</div>

running fine here too on latest discourse

---

<div class="post-metadata">

### Author: ![ncaming215](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ncaming215/32/205701_2.png) [@ncaming215](https://meta.discourse.org/u/ncaming215)
#### Post date: [August 24, 2025, 10:46pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/89 "2025-08-24T22:46:40Z")

</div>

![Screenshot 2025-08-24 at 6.46.17 PM](https://global.discourse-cdn.com/meta/original/4X/1/8/e/18e95843dde7e060efe4c36487fd65bc983ff848.png)

> **[Call me crazy, but](https://thedenforum.com/t/call-me-crazy-but/43981)**
>
> I wouldn’t hate bringing him in.

---

<div class="post-metadata">

### Author: ![ncaming215](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ncaming215/32/205701_2.png) [@ncaming215](https://meta.discourse.org/u/ncaming215)
#### Post date: [August 24, 2025, 10:47pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/90 "2025-08-24T22:47:22Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Jack123](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@Jack123](https://meta.discourse.org/u/Jack123)
#### Post date: [August 28, 2025, 11:32pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/91 "2025-08-28T23:32:36Z")

</div>

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

---

<div class="post-metadata">

### Author: ![REALITY](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/reality/32/199798_2.png) [@REALITY](https://meta.discourse.org/u/REALITY)
#### Post date: [August 29, 2025, 12:03am UTC](https://meta.discourse.org/t/twitter-native-embed/261792/92 "2025-08-29T00:03:32Z")

</div>

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.

 ![Screenshot_20250829_010037](https://global.discourse-cdn.com/meta/original/4X/8/4/3/8434d21460e9938afc72db8a71b9b3e783dac699.png)

---

<div class="post-metadata">

### Author: ![etc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/etc/32/114717_2.png) [@etc](https://meta.discourse.org/u/etc)
#### Post date: [September 24, 2025, 11:23am UTC](https://meta.discourse.org/t/twitter-native-embed/261792/93 "2025-09-24T11:23:33Z")

</div>

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](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.`

---

<div class="post-metadata">

### Author: ![jazznutUVA](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jazznutUVA](https://meta.discourse.org/u/jazznutUVA)
#### Post date: [November 5, 2025, 1:20pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/94 "2025-11-05T13:20:54Z")

</div>

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](http://x.com) it does not work, but if you change it to [twitter.com](http://twitter.com) it works!

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/2/1/421bba9d3eb0e2177447cee6802f852c60b24e1a.png)

---

<div class="post-metadata">

### Author: ![legrit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/legrit/32/90307_2.png) [@legrit](https://meta.discourse.org/u/legrit)
#### Post date: [November 5, 2025, 3:13pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/95 "2025-11-05T15:13:53Z")

</div>

setting “Block onebox on redirect” fixed it for me

---

<div class="post-metadata">

### Author: ![ZeroDean](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zerodean/32/527869_2.png) [@ZeroDean](https://meta.discourse.org/u/ZeroDean)
#### Post date: [December 20, 2025, 5:32pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/96 "2025-12-20T17:32:18Z")

</div>

> [@jazznutUVA](#):
>
> if you use [x.com](http://x.com) it does not work, but if you change it to [twitter.com](http://twitter.com) it works!

Same here. It would be nice if [x.com](http://x.com) worked, but at least this is still a valid workaround in December 2025.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [December 20, 2025, 6:22pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/97 "2025-12-20T18:22:26Z")

</div>

@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):

 ![Screenshot 2025-12-20 at 10.19.27 AM](https://global.discourse-cdn.com/meta/original/4X/a/6/5/a652626f2217b8725ac7c685d52ee10f4abab783.png)

  

 ![Screenshot 2025-12-20 at 10.20.49 AM](https://global.discourse-cdn.com/meta/original/4X/7/7/f/77f3420b70b32202cb5096b644c6f6f98eb00d3d.png)

---

<div class="post-metadata">

### Author: ![ZeroDean](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zerodean/32/527869_2.png) [@ZeroDean](https://meta.discourse.org/u/ZeroDean)
#### Post date: [December 20, 2025, 6:30pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/98 "2025-12-20T18:30:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [December 20, 2025, 7:19pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/99 "2025-12-20T19:19:32Z")

</div>

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.

```bash
# Enter Rails console
./launcher enter app
rails c

```

```ruby
# 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! }
```

---

<div class="post-metadata">

### Author: ![ZeroDean](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zerodean/32/527869_2.png) [@ZeroDean](https://meta.discourse.org/u/ZeroDean)
#### Post date: [December 20, 2025, 7:20pm UTC](https://meta.discourse.org/t/twitter-native-embed/261792/100 "2025-12-20T19:20:54Z")

</div>

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! 🙌

[Previous page](https://meta.discourse.org/t/twitter-native-embed/261792.md?page=4)

[Next page](https://meta.discourse.org/t/twitter-native-embed/261792.md?page=6)
