# 트위터 상태 onebox 오류 수정

**URL:** https://meta.discourse.org/t/twitter-status-onebox-error-fix/307203
**Category:** Development
**Tags:** onebox
**Created:** [5월 8, 2024, 4:48오전 UTC](https://meta.discourse.org/t/twitter-status-onebox-error-fix/307203 "2024-05-08T04:48:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dsims](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dsims/32/485916_2.png) [@dsims](https://meta.discourse.org/u/dsims)
#### Post date: [5월 8, 2024, 4:48오전 UTC](https://meta.discourse.org/t/twitter-status-onebox-error-fix/307203/1 "2024-05-08T04:48:51Z")

</div>

일부 메타 태그가 누락된 경우 트위터 원박스(onebox) 코드에 오류가 발생합니다. 아마도 트위터의 HTML 구조가 어떤 시점에 변경되었고, 머피의 법칙이 발동한 것 같습니다.

[PR](https://github.com/discourse/discourse/pull/26927)을 열어 이 오류를 수정하고 (일단) 존재하는 메타 태그를 사용하도록 했습니다. 따라서 차단되지 않는 한 기본 트위터 원박스가 다시 작동해야 합니다.

> <https://github.com/discourse/discourse/pull/26927>
>
> There is an error ("no implicit conversion of Array into Integer") if some meta …tags are missing. At some point the twitter HTML changed and Murphy's law kicked in. This fixes the error and uses meta tags that exist.

 ![](https://global.discourse-cdn.com/meta/original/4X/e/9/e/e9e61f13d9752c24184b48eefe754600fabd9fb9.png)

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [5월 8, 2024, 1:16오후 UTC](https://meta.discourse.org/t/twitter-status-onebox-error-fix/307203/2 "2024-05-08T13:16:47Z")

</div>

오래전부터 트위터 링크를 공유하지 않았습니다. 하지만 처음에 문제가 발생했을 때 이를 해결해 주던 테마 구성 요소가 하나 있었습니다.

> [@Twitter 네이티브 임베드](https://meta.discourse.org/t/twitter-native-embed/261792):
>
> We don’t enable embedding in composer preview, which is the expected behavior. information_sourceSummary Enable Discourse to support native Twitter embedshammer_and_wrenchRepository [GitHub - Lhcfl/discourse-twitter-native-embed · GitHub](https://github.com/Lhcfl/discourse-twitter-native-embed)questionInstall Guide [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component A recent Twitter API limitation has prevent…

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [5월 8, 2024, 1:20오후 UTC](https://meta.discourse.org/t/twitter-status-onebox-error-fix/307203/3 "2024-05-08T13:20:40Z")

</div>

여기가 그 효과입니다

 ![Screenshot_20240508-101942](https://global.discourse-cdn.com/meta/original/4X/e/6/6/e6645c09bf79704eb68b53093e61ea739a7a1248.jpeg)

---

<div class="post-metadata">

### Author: ![dsims](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dsims/32/485916_2.png) [@dsims](https://meta.discourse.org/u/dsims)
#### Post date: [5월 8, 2024, 1:30오후 UTC](https://meta.discourse.org/t/twitter-status-onebox-error-fix/307203/4 "2024-05-08T13:30:45Z")

</div>

네, 그 트위터 컴포넌트는 [트위터의 JavaScript 위젯](https://publish.twitter.com/)을 사용하지만, 이 방법은 서버 측 처리 방식을 복원합니다.
