OpenGraph 标签是无关的?
致力于向我们的婚纱摄影网站的各个页面添加开放图标签,以供 Facebook Like 按钮使用。我已经很接近了,但我仍然收到一个警告 无关属性:此类型的对象不允许名为 og:sitename 的属性。
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="imagetoolbar" content="no">
<meta name="generator" content="jAlbum 9, http://jalbum.net">
<meta property="fb:admins" content='1591068265'>
<meta property="og:type" content="website">
<meta property="og:sitename" content="Dawn Kelly Photography">
<meta property="og:url" content="http://www.DawnKellyPhotography.com/edgarvaht/galleries/FBalbum/fbindex.php?show=slides/NodownLoad.html">
<meta property="og:image" content="http://www.DawnKellyPhotography.com/edgarvaht/galleries/FBalbum/slides/NodownLoad.jpg">
<meta property="og:title" content="Facebook Test Gallery - NodownLoad.jpg">
<meta property="og:description" content="Facebook Test Gallery, image: NodownLoad.jpg">
既然它说它是无关的,这是否意味着我不需要站点名称标签?至于类型,“网站”是一个不错的选择,还是应该选择“产品”或其他内容,因为该页面是购买图像的页面。
Working on adding open graph tags to the individual pages of our wedding photography site for use by the Facebook Like button. I'm close, but I still get one warning
Extraneous Property: Objects of this type do not allow properties named og:sitename.
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="imagetoolbar" content="no">
<meta name="generator" content="jAlbum 9, http://jalbum.net">
<meta property="fb:admins" content='1591068265'>
<meta property="og:type" content="website">
<meta property="og:sitename" content="Dawn Kelly Photography">
<meta property="og:url" content="http://www.DawnKellyPhotography.com/edgarvaht/galleries/FBalbum/fbindex.php?show=slides/NodownLoad.html">
<meta property="og:image" content="http://www.DawnKellyPhotography.com/edgarvaht/galleries/FBalbum/slides/NodownLoad.jpg">
<meta property="og:title" content="Facebook Test Gallery - NodownLoad.jpg">
<meta property="og:description" content="Facebook Test Gallery, image: NodownLoad.jpg">
Since it is saying it is extraneous, does that mean I don't need the sitename tag? As for the type, is "website" a good choice, or should I pick "product" or something else since the page is a page to purchase the image.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的页面绝对不应该使用
website
类型,因为它适用于整个网站而不是网站上的各个页面,product
可能是更合适的类型。此外,正确的属性是og:site_name
而不是og:sitename
,因此这可能是导致您出现问题的原因。A page like that should definitely not use the
website
type as that's intended for whole sites and not individual pages on a site,product
is probably a more appropriate type. Additionally, the correct property isog:site_name
and notog:sitename
so that is probably what is causing your issue.