Closed p0g closed 4 years ago
In the OpenGraphPackage you are using the same tag generator like other meta-tags, but this is not working for OpenGraph: Generated, wrong tag: <meta name="og:type" content="website"> Correct tag would be: <meta property="og:type" content="website">
<meta name="og:type" content="website">
<meta property="og:type" content="website">
See: https://developers.facebook.com/docs/sharing/webmasters
My quick "bugfix" local, is to extend vendor/butschster/meta-tags/src/Packages/Entities/Concerns/ManageMeta.php with:
public function addOgMeta(string $key, string $content) { $key = $this->prefix.$key; $this->tags->put($key, Tag::meta([ 'property' => $key, 'content' => $content, ])); return $this; }
And replace $this->addMeta with $this->addOgMeta in vendor/butschster/meta-tags/src/Packages/Entities/OpenGraphPackage.php
$this->addMeta
$this->addOgMeta
Thank you!
In the OpenGraphPackage you are using the same tag generator like other meta-tags, but this is not working for OpenGraph: Generated, wrong tag:
<meta name="og:type" content="website">
Correct tag would be:<meta property="og:type" content="website">
See: https://developers.facebook.com/docs/sharing/webmasters
My quick "bugfix" local, is to extend vendor/butschster/meta-tags/src/Packages/Entities/Concerns/ManageMeta.php with:
public function addOgMeta(string $key, string $content) { $key = $this->prefix.$key; $this->tags->put($key, Tag::meta([ 'property' => $key, 'content' => $content, ])); return $this; }
And replace
$this->addMeta
with$this->addOgMeta
in vendor/butschster/meta-tags/src/Packages/Entities/OpenGraphPackage.php