【发布时间】:2020-12-15 00:45:42
【问题描述】:
我创建了一个 Web 应用程序 (https://www.atalki.com/) 并使用 facebook 调试器工具测试该应用程序,以确保 URL 在 whatsapp 和其他社交媒体渠道中正确显示。 但是由于某种原因,我所有的 og 标签都被忽略了。
我没有提到的唯一元标记是
提到了其他标签。
<meta property="og:title" content="atalki" data-react-helmet="true">
<meta property="og:description" content="Documents to shareable websites, within seconds" data-react-helmet="true">
<meta property="og:url" content="https://www.atalki.com/" data-react-helmet="true">
<meta property="og:image" content="https://www.atalki.com/static/media/Logo_For_Whatsapp.c3b71cbc.jpg" data-react-helmet="true">
<meta property="og:site_name" content="atalki" data-react-helmet="true">
<meta property="og:type" content="website" data-react-helmet="true">
<meta property="og:image:type" content="image/jpeg/png/svg/jpg" data-react-helmet="true">
<meta property="og:image:width" content="312" data-react-helmet="true">
<meta property="og:image:height" content="312" data-react-helmet="true">
<meta property="og:image:alt" content="atalki" data-react-helmet="true">
<meta property="og:locale" content="en_GB" data-react-helmet="true">
<meta name="twitter:card" content="summary" data-react-helmet="true">
<meta name="twitter:site" content="@doc2qa" data-react-helmet="true">
<meta name="twitter:creator" content="@doc2qa" data-react-helmet="true">
不知道我在哪里出错了。 另外,当回显整个代码时,我看不到任何元标记。
https://developers.facebook.com/tools/debug/echo/?q=http%3A%2F%2Fwww.atalki.com%2F
我很确定,我在做一些愚蠢的事情,但不确定它是什么。谁能帮帮我。
【问题讨论】:
-
您的服务器没有返回任何 og-tags。我的猜测是您正在使用一些 Javascript 框架,这就是添加 og-tags 的原因。那不管用。您的服务器需要在请求 URL 时发送给 Facebook 的 HTML 中包含标签。
-
非常感谢@WizKid。我可以看到在 chrome 控制台中呈现的所有标签。这意味着服务器正在发送 og-tags 对吗?
-
我使用 React 作为 javascript 框架
-
不,它没有。 React 在网络浏览器中运行。如果您不进行服务器渲染。如果你不知道你不是。
-
@WizKid - 谢谢。知道了。我不做服务器渲染。我会改的。
标签: facebook facebook-graph-api facebook-opengraph