# Twitter出现问题。登录无法使用，Onebox也无法使用

**URL:** https://meta.discourse.org/t/problem-with-twitter-login-not-working-and-onebox-doesnt-work/211040
**Category:** Support
**Created:** [2021年十二月3日 19:22 UTC](https://meta.discourse.org/t/problem-with-twitter-login-not-working-and-onebox-doesnt-work/211040 "2021-12-03T19:22:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flash](https://meta.discourse.org/u/flash)
#### Post date: [2021年十二月3日 19:22 UTC](https://meta.discourse.org/t/problem-with-twitter-login-not-working-and-onebox-doesnt-work/211040/1 "2021-12-03T19:22:35Z")

</div>

Onebox 在与其他网站的合作中似乎没有问题。我曾就此问题在 discourse 上发帖，但单独在 wordpress 上测试时没有问题。

> [@Twitter signup not setting user email address](https://meta.discourse.org/t/twitter-signup-not-setting-user-email-address/210748/7):
>
> I re-did it on twitters end. Same thing. It doesnt give any data back just shows this. Thats not the username on twitter obviously but thats what it shows after its enabled and directs back to site.

现在我发布一个 Twitter 链接，但没有任何显示。只是一个普通链接。有人知道为什么会这样吗？

---

<div class="post-metadata">

### Author: ![flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flash](https://meta.discourse.org/u/flash)
#### Post date: [2021年十二月3日 21:24 UTC](https://meta.discourse.org/t/problem-with-twitter-login-not-working-and-onebox-doesnt-work/211040/2 "2021-12-03T21:24:55Z")

</div>

已更改服务器 IP 地址。重新生成访问密钥。现在我收到此错误：

`抱歉，我们无法为此网页生成预览，因为找不到以下 oEmbed / OpenGraph 标签：description、image`

---

<div class="post-metadata">

### Author: ![flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flash](https://meta.discourse.org/u/flash)
#### Post date: [2021年十二月4日 02:29 UTC](https://meta.discourse.org/t/problem-with-twitter-login-not-working-and-onebox-doesnt-work/211040/3 "2021-12-04T02:29:23Z")

</div>

我逐一检查了所有主题组件、插件，删除了 CSS……一整天都在试图弄清楚这个问题，最后发现是 `templates/cloudflare.template.yml` 导致了问题。

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2021年十二月4日 05:50 UTC](https://meta.discourse.org/t/problem-with-twitter-login-not-working-and-onebox-doesnt-work/211040/4 "2021-12-04T05:50:57Z")

</div>

> [@flash](#):
>
> `templates/cloudflare.template.yml` 导致了问题。

你知道它 _是_ 如何导致问题的吗？

---

<div class="post-metadata">

### Author: ![flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flash](https://meta.discourse.org/u/flash)
#### Post date: [2021年十二月4日 08:53 UTC](https://meta.discourse.org/t/problem-with-twitter-login-not-working-and-onebox-doesnt-work/211040/5 "2021-12-04T08:53:14Z")

</div>

我确实没有。我今天会再试试看。我尝试了大约 5 种不同的设置，以为是某个端口问题或 IP 被 Twitter 阻止了。直到我移除了所有东西，才注意到这是我唯一没有检查过的东西。移除它后，Twitter 在测试服务器上开始正常工作，然后在我移除它后在主服务器上也能正常工作。我将它重新添加到测试服务器以进行验证，Twitter 在其上再次停止工作。当时已经凌晨 3 点多了，我需要睡觉。

Twitter 登录对我来说很重要，使用 Cloudflare 也很重要。我所推动的大多数市场都使用 Twitter。无论我是否将其设置为通过 Cloudflare 路由流量，或者在 Cloudflare 上将其关闭，都没有关系。只要它在网站设置中，Twitter 就无法通过。我留下了一个活动的服务器，并将继续尝试，直到它能正常工作。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2022年一月3日 08:53 UTC](https://meta.discourse.org/t/problem-with-twitter-login-not-working-and-onebox-doesnt-work/211040/6 "2022-01-03T08:53:25Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
