问题描述
我的测试页面在这里.http://smartphone.mn/news/2110
.我正在使用Facebook对象调试器,调试器返回og:type = website
和4推断的属性警告(og:url,or:img,og:description,og:image).
my tested page is here. http://smartphone.mn/news/2110
. I'm using facebook object debugger, Debugger return og:type = website
and 4 Inferred property warning (og:url,or:img, og:description, og:image).
如何解决此问题.为什么对象类型返回错误?
How can fix this. Why object type return wrong?
推荐答案
您以错误的方式使用OpenGraph元标记.这是页面中的代码:
You using OpenGraph meta-tags in a wrong manner. This is a code you have in page:
<meta name="fb:app_id" content="..." />
<meta name="og:type" content="article" />
...
但是事实是您必须使用名为property
的属性而不是name
来指定OpenGraph数据的名称...
But the fact is you MUST use property named property
instead of name
to specify the name of the OpenGraph data...
因此,您只需将OpenGraph元标记的name
替换为property
,即可解决此问题:
So to solve this you just need to replace name
to property
for OpenGraph meta-tags:
<meta property="fb:app_id" content="..." />
<meta property="og:type" content="article" />
...
这篇关于在对象调试器中得到错误的ogtype的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!