OGP Facebook meta property=”article:publisher”警告の解決方法

OGP Facebook meta property=”article:publisher”警告の解決方法


Red Bull - new can tab
OGPのタグに新規に追加された【<meta property=”article:publisher”】を設定して、警告が出たのでその原因と解決方法を書きます。
下記エラーが出ました。

Extraneous Property:
Objects of this type do not allow properties named ‘article:publisher’.

Parser Mismatched Metadata:
The parser’s result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a single value, or property values for a given property being mismatched. Here are the input properties that were not seen in the parsed result: ‘article:publisher’

どちらも【<meta property=”article:publisher”】に何か関係がありそうな警告です。

原因
<meta property="og:type" content="○○○" />
というogpの種類を指定するタグがあります。
このタグが、【website】や【blog】の場合のみ上記警告が出ます。
というのも【<meta property="article:publisher"】というものがブログ記事やトップページ以外の子ページを対象としたものだからのようです。

解決方法
トップページに設定したタグが【website】や【blog】の場合には、【<meta property="article:publisher"】を指定しない。
<meta property="og:type" content="article" />
を設定したページのみ【<meta property="article:publisher"】を設定する。
要は、
<meta property="og:type" content="article" />

<meta property="article:publisher" content=https://www.facebook.com/●●● />
は、個別のfacebookページを持っていない場合以外、ほぼセットのようなものだと思います。

リンク
デバッガー - Facebook開発者
https://developers.facebook.com/tools/debug




人気ブログランキングへ

photo by: viZZZual.com

コメントする




過去の記事はこちらから検索

カスタム検索



人気の記事









当ブログのバナーはこちら↓
GIZAZINE
GIZAZINE

 RSS2
 ATOM
↑当ブログの購読はこちら

GIZAZINE(ギザジン)公式twitterアカウントあります。

お問い合わせはこちらからどうぞ。

One in a Million Theme by TDH & WordPress theme