我的网站开放图元标签没有显示在开发人员的facebook调试器中



我将og元标签添加到我的网站中,当我打开检查器时,我可以看到它们,但当我转到facebook调试器时,它会告诉我丢失了刚才添加的所有标签。

代码正在使用MetaTags包。

<MetaTags>
<title>Find Their Gifts</title>
<meta name="description" content="The personality quiz that suggests gifts based on the results" />
<meta name="keywords" content="find their gifts, gift quiz, gift personality quiz, gift finder" />
<meta property="fb:app_id" content="349573132258777" />
<meta property="og:title" content="Find Their Gifts: The Personality Quiz Gift Finder" />
<meta property="og:image" content="https://www.findtheirgifts.com/metaimage.png" />
<meta property="og:image_secure" content="https://www.findtheirgifts.com/metaimage.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.findtheirgifts.com/" />
<meta property="og:description" content="The personality quiz that suggests gifts based on the results. Find gifts that they really want." />
</MetaTags>

如果你在findthegifts.com 上打开检查员,你可以看到标签正确显示

但facebook调试器告诉我'缺少以下必需属性:og:url、og:type、og:title、og:image、og:description、fb:app_id'

我是不是错过了什么?我很感激朝着正确的方向努力

这有一个非常简单的解决方案,我花了太长时间才实现。元标签显示在检查器中,但没有显示在Facebook调试器中的原因是,元标签是在客户端添加的,而Facebook爬网程序从未看到它们。您可以通过打开页面源而不是检查器来检查这一点。

如果你把元标签移到index.html页面,它们就会显示出来。

如果你需要元标签是动态的,你需要深入研究一些更复杂的解决方案。但这些不变的标签正是我努力实现的目标。

最新更新