Jump to content

Invalid OGP tags in module socialsharing's hook header view


Denver Prophit Jr.

Recommended Posts

I was running a site through FB's linter debug and found all sorts of invalid OGP tags in the header. I narrowed it down to /modules/socialsharing/views/templates/hook/socialsharing_header.tpl

<meta property="og:title" content="{$meta_title|escape:'html':'UTF-8'}" />
<meta property="og:url" content="{$request}" />
<meta property="og:type" content="product" />
<meta property="og:site_name" content="{$shop_name}" />
<meta property="og:description" content="{$meta_description|escape:'html':'UTF-8'}" />
<meta property="og:email" content="" />
<meta property="og:phone_number" content="" />
<meta property="og:street-address" content="" />
<meta property="og:locality" content="" />
<meta property="og:country-name" content="" />
<meta property="og:postal-code" content="" />
{if isset($link_rewrite) && isset($cover) && isset($cover.id_image)}
<meta property="og:image" content="{$link->getImageLink($link_rewrite, $cover.id_image, large_default)}" />
{/if}

Now, according to FB's developer docs:

https://developers.facebook.com/docs/reference/opengraph#object-type explains the valid types of FB's official og types. Even though products are custom and not documented at http://ogp.me/#types

 

Facebook goes further into detail about product pages with this link https://developers.facebook.com/docs/reference/opengraph/object-type/product/

 

There are many useful tags to setup a solid RDFa relationship. I noticed there was a tag for product.group which may be useful on category pages. The default-boostrap theme may even should use a schema collection page definition.

 

Please support and vote for my feature request to enhance this module header to be more intelligent on the page types. Be they CMS or product or product category! http://forge.prestashop.com/browse/PSCSX-5317

 

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...