【发布时间】:2011-09-04 05:46:30
【问题描述】:
我们可以使用meta name="fb:admins"
代替
meta property="fb:admins"
用于 w3c 验证??
【问题讨论】:
标签: facebook validation admin meta-tags
我们可以使用meta name="fb:admins"
代替
meta property="fb:admins"
用于 w3c 验证??
【问题讨论】:
标签: facebook validation admin meta-tags
我正在回答这个问题,尽管这是一个老问题,因为我认为这对未来想要了解这方面信息的人来说很有价值。当 Evan 说它不会通过验证时,他可能是对的,但我认为答案是您想保留 property="" 属性。取自old Facebook developer forum post concerning this question exactly,结果证明您的文档应该是 XHTML + RDFa 文档。由于DOCTYPE 声明,这将在 W3C 中得到验证:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
version="XHTML+RDFa 1.0"
xmlns:og="http://ogp.me/ns#"
xml:lang="en">
<head>
<title>Virtual Library</title>
<meta property="og:title" content="My Website"/>
</head>
<body>
<p>Moved to <a href="http://example.org/">example.org</a>.</p>
</body>
</html>
您可以在W3C spec for RDFa 和this specific example of <meta property=""/> 中找到更多信息。
【讨论】:
不,你只会得到这个:
Line 1, Column 123: Bad value fb:app_id for attribute name on element meta: Keyword fb:app_id is not registered.
…="fb:app_id" content="176557225718913"><meta charset="utf-8"><meta name="descr…
Syntax of metadata name:
A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself.
【讨论】: