OpenGraph tag is extraneous?
-
27-10-2019 - |
题
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.
解决方案
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.