Facebook Open Graph, required property 'og:title' of type 'string' was not provided

后端 未结 2 755
北恋
北恋 2021-01-05 13:12

I have a Joomla-page (v3.2.4) where I put in some dynamic Open Graph tags with PHP, like this:

The PHP, before the tag:

$getcid = JRequest::getVar(\         


        
相关标签:
2条回答
  • 2021-01-05 13:53

    You might want to try to disable any sort of compression, for example GZIP compression in PHP. This helped me with a similar problem in a Joomla 3.3 website.

    I had GZIP compression enabled and Facebook was unable to scrape my website. Disabling the GZIP compression solved that issue.

    I have not figured out yet if it's a Joomla problem or a GZIP/PHP problem in general or a facebook scrape problem.

    EDIT: With a share action, Facebook only reads the first 40k of your page. When GZIP is enabled, reading only the first 40k will give problems as it is unable to decompress the partial contents.

    A better solution would be to disable GZIP only for sites like Facebook, LinkedIn, etc.

    You can use the small plugin called gzip very friendly Control: http://extensions.joomla.org/extensions/core-enhancements/performance/site-performance/27725

    Or use this codee https://github.com/dgt41/ (zip the xml and php file and you can install it as a plugin)

    Please note: If you have JCH Optimize module installed on your site you will need to disable gzip compression offered by the plugin. All other options can remain activated without any problems, including a native Joomla gzip compression.

    Cheers, Teeuwis

    0 讨论(0)
  • 2021-01-05 13:59

    I found a solution for the problem in joomla 3 modifying only 2 files form joomla core so you don't have to turn off the GZIP option. It's turn off automaticaly only when detect the facebook crawler.

    https://github.com/dgt41/joomla-cms/commit/6eef42e50e3f3e4c78c93285de7f9ecfe8bbfbf5 and a plugin to solve the problem but this one don't run ok to me.

    https://github.com/dgt41/facebookfix/commit/e1d5aa3a1a94f7751d3b69db78ba1aa02dfc37c6

    0 讨论(0)
提交回复
热议问题