首页 > 解决方案 > 由于“X-frame-options”设置为“拒绝”,Facebook 评论在网站的所有页面上被禁用

问题描述

我在我网站的每个页面上都使用 Facebook 评论,使用他们的评论插件

最近,我注意到每个网页上的评论都停止显示,在控制台中出现以下错误:

 Refused to display [url] in a frame because it set 'X-Frame-Options' to 'deny'.

完整错误:

Refused to display 'https://www.facebook.com/plugins/feedback.php?app_id&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D44%23cb%3Df2f5722dfd41%26domain%3Dtheinternet.io%26origin%3Dhttps%253A%252F%252Ftheinternet.io%252Ffb2882a8d21d58%26relation%3Dparent.parent&container_width=1904&height=100&href=https%3A%2F%2Ftheinternet.io%2Ftest-page.html&locale=en_US&numposts=5&sdk=joey&version=v3.3&width=550' in a frame because it set 'X-Frame-Options' to 'deny'.

此外,当我将网站中的任何 url 放入Facebook 的 Comments Plugin Code Generator中时,甚至不会显示评论框的示例。

按照这篇文章中的建议,我尝试设置指向 target="_top" 的链接,但这并没有改变任何东西。

如果你想重现问题,这里有一个测试页

标签: javascripthtmlfacebookiframex-frame-options

解决方案


检查共享调试器后,发现我的网站因不符合社区标准而被阻止,收到此错误:“我们无法审查此网站,因为内容不符合我们的社区标准。如果您认为这是一个错误, 请告诉我们。”


推荐阅读