Facebook规范网址根本不会抓取

时间:2016-07-12 09:14:48

标签: facebook facebook-graph-api typo3 facebook-opengraph opengraph

我对我们的Facebook OG-Tags的问题感到生气,我的大学里没有任何人可以帮助我。 问题是:我们使用TYPO3扩展来完全按照Facebook在其最佳实践规则中要求的格式生成开放图形元标记。所以在我们的主页上,meta标签看起来像这样:

<meta property="fb:app_id" content="1076994975680778" />
<meta property="og:title" content="Startseite" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://www.syncomnet.com/template/Resources/Public/images/icons/scn_facebook.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="250" />
<meta property="og:image:height" content="250" />
<meta property="og:url" content="https://www.syncomnet.com/home.html" />
<meta property="og:site_name" content="SynComNet" />
<meta property="og:description" content="Personalplanung / Personaleinsatzplanung / Dienstplan mit PersPlanNet ERP Software von SynComNet" />
<meta property="og:locale" content="de_DE" />

问题是,Facebook机器人根本不抓取页面。在抓取我们的主页后会导致页面完全空白,如您所见:

https://developers.facebook.com/tools/debug/echo/?q=https%3A%2F%2Fwww.syncomnet.com%2Fhome.html

当我现在复制主页的整个来源并将其粘贴到静态test.html中时,抓取工具会获取该页面。我唯一需要改变的是og:url元属性中的规范URL ...

<meta property="og:url" content="https://www.syncomnet.com/test.html" />

......机器人没有任何问题。

https://developers.facebook.com/tools/debug/echo/?q=https%3A%2F%2Fwww.syncomnet.com%2Ftest.html

问题是,CMS生成的所有页面都不会以任何方式被抓取。我还测试了robots.txt是否只是允许&#34; /&#34;,但这没有影响。错误在哪里?非常感谢你!

1 个答案:

答案 0 :(得分:0)

我现在离得更近了:facebook机器人似乎无法处理gzip压缩。

如果我在.htaccess中注释掉以下部分...

<IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE application/atom+xml \
        application/javascript \
        application/json \
        application/ld+json \
        application/manifest+json \
        application/rdf+xml \
        application/rss+xml \
        application/schema+json \
        application/vnd.geo+json \
        application/vnd.ms-fontobject \
        application/x-font-ttf \
        application/x-javascript \
        application/x-web-app-manifest+json \
        application/xhtml+xml \
        application/xml \
        font/eot \
        font/opentype \
        image/bmp \
        image/svg+xml \
        image/vnd.microsoft.icon \
        image/x-icon \
        text/cache-manifest \
        text/css \
        text/html \
        text/javascript \
        text/plain \
        text/vcard \
        text/vnd.rim.location.xloc \
        text/vtt \
        text/x-component \
        text/x-cross-domain-policy \
        text/xml
</IfModule>

... facebook刮刀工作正常。问题:此部分是TYPO3的默认值。我现在正在查看如何为facebook机器人添加例外。

相关问题