OpenGraph 标签是无关的?

发布于 2025-01-06 11:15:06 字数 1291 浏览 2 评论 0原文

致力于向我们的婚纱摄影网站的各个页面添加开放图标签,以供 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

金兰素衣 2025-01-13 11:15:06

像这样的页面绝对不应该使用 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 is og:site_name and not og:sitename so that is probably what is causing your issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文