即使在澄清 Facebook 的开放图谱协议后,网站也无法验证
我按照 Facebook 开发者页面上的说明进行操作,但这仍然无法验证。 这是为什么呢?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta property="og:image" content="image.png" >
more meta
</head>
<html>
I followed the instructions at Facebook Developers Page, but this is still not validating.
Why is this?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta property="og:image" content="image.png" >
more meta
</head>
<html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
xmlns
属性仅在 XHTML 文档中允许,不能在 HTML 中指定。尝试:此外,即使将文档类型更改为 XHTML,
meta
元素上仍然不允许使用property
属性。以下 XHTML 仅针对
property
属性产生单个错误:编辑: 我找到了一种可以通过 W3C 检查器的文档类型。该文档类型似乎已经使用 XHTML 1.1,尽管标题显示为 1.0(不确定)。
The
xmlns
property is only allowed in XHTML documents, you can't specify that in HTML. Try:Also, it appears that even with the document type changed to XHTML, the
property
attribute is still not allowed on ameta
element.The following XHTML only produces the single error for the
property
attribute:Edit: I have found a document type that you can use that will pass at the W3C checker. It appears that this document type already uses XHTML 1.1 even though the title says 1.0 (not sure).