OG标签不会被解析为刮刀

时间:2013-02-03 16:16:18

标签: facebook smarty

我想将我的网站上的文章发布到我的时间轴上,但是在某些地方,元标记会被清空。例如: http://www.uisge-beatha.eu/logboek/401/Verbouwing-koelbox-3.html 如果我查看网站的来源,我会看到以下OG标签

<link rel="canonical" href="http://www.uisge-beatha.eu/logboek/401/30/Verbouwing-koelbox-3.html" />
<meta property="fb:app_id" content="175931732519501" />
<meta property='og:type' content='article'> 
<meta property="og:url" content="http://www.uisge-beatha.eu/logboek/401/30/Verbouwing-koelbox-3.html" />
<meta property="og:image" content="http://www.uisge-beatha.eu/uploads/cgblog/id401&#47;Koelkast_-_30.jpg" />
<meta property="og:title" content="Verbouwing koelbox - 3" />
<meta property="og:description" content="Het testen van de compressor..." />

通过检查FB调试器,它有时可以处理它,有时它会失败。一切原因不明。 https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.uisge-beatha.eu%2Flogboek%2F401%2FVerbouwing-koelbox-3.html

如果它处理正常,我会通过查看OG-metatags看到基于页面源的我期望的信息。但是,如果我看看刮刀,那么这些元标记都是空的。

<link rel="canonical" href="http://www.uisge-beatha.eu/Nieuwtjes.html">
<meta property="fb:app_id" content="175931732519501">
<meta property="og:type" content="article">
<meta property="og:url" content="">
<meta property="og:image" content="/">
<meta property="og:title" content="">
<meta property="og:description" content="">

不知道为什么这些是空的。一直在挖掘解决方案几个小时,但没有找到。

负责“填充”元数据的网站模板包含巧妙的逻辑:

<link rel="image_src" type="image/jpeg" href="{$entry->file_location}&#47;{$entry->fieldsbyname.facebook_thumbnail->value}" alt="{$entry->title|escape}" />
{if isset($canonical)}<link rel="canonical" href="{$canonical}" />
{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />
{/if}
<meta property="fb:app_id" content="175931732519501" />
<meta property='og:type' content='article'> 
<meta property="og:url" content="{$canonical}" />
<meta property="og:image" content="{$entry->file_location}&#47;{$entry->fieldsbyname.facebook_thumbnail->value}" />
<meta property="og:title" content="{$entry->title|escape}" />
<meta property="og:description" content="{$entry->summary|strip_tags:false}" />

有谁愿意帮我解决这个奇怪的行为?

0 个答案:

没有答案