Facebook Like 按钮在网站上不起作用,但 FB URL Linter 未报告错误

发布于 2024-12-26 10:10:54 字数 1447 浏览 1 评论 0原文

不知道为什么 Facebook 点赞按钮在此网站上不起作用: http://allisonchow.com

Screenshot of FB like button error

单击错误中的 error 链接(如上面的屏幕截图所示)我收到此错误:

<图片src="https://i.sstatic.net/NDG5T.png" alt="FB error">

我已经通过 Facebook URL Linter (https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fallisonchow.com),它报告没有错误。我尝试过该按钮的 HTML5、XFBML 以及 IFRAME 版本,但没有成功。

其他细节:

FB URL linter 有时会报告 og:urlog:title 未“明确提供”的警告:

The og:url property should be explicitly provided, even if a value can 
be inferred from other tags.

The og:title property should be explicitly provided, even if a value can 
be inferred from other tags.

然而,奇怪的是是这两个 OpenGraph 标签都是在我的代码中指定的。 FB Linter 甚至通过在同一页面的下方显示来确认这一点:

Screenshot of FB URL Linter

此外,linter 偶尔会给出此信息还有警告:

The og:locale property should be explicitly provided, even if a 
value can be inferred from other tags.

但是,如果我重新加载 linter 并再次通过它运行 URL,警告将定期出现和消失。啊。

不幸的是,当 Like 按钮不起作用时,如果 Linter 不报告错误,我发现调试起来非常困难!

我一定错过了一些明显的东西,所以希望得到一些帮助!

No idea why Facebook like button isn't working on this site: http://allisonchow.com

Screenshot of FB like button error

Clicking on the error link in error (shown in above screenshot) I get this error:

FB error

I've triple checked it through Facebook URL Linter (https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fallisonchow.com) and it reports that there are no errors. I've tried the HTML5, XFBML as well as IFRAME versions of the button with no luck.

Other details:

FB URL linter sometimes reports warnings that og:url and og:title are not "explicitly provided":

The og:url property should be explicitly provided, even if a value can 
be inferred from other tags.

The og:title property should be explicitly provided, even if a value can 
be inferred from other tags.

However, the weird thing is that both these OpenGraph tags are specified in my code. FB Linter even confirms it by showing further down the same page:

Screenshot of FB URL Linter

Additionally, the linter will occassionally give this warning as well:

The og:locale property should be explicitly provided, even if a 
value can be inferred from other tags.

But again, if I reload the linter and run the URL through it again, the warnings will periodically appear and disappear. Ugh.

Unfortunately when a Like button doesn't work, if the Linter doesn't report errors I find it extremely hard to debug!

I must be missing something obvious so would love some help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文