我正在使用分享链接Google+:https://plus.google.com/share?hl=fr&url=http%3A%2F%2Fmywebsite.com%2F
我想知道如何强制Google+分享<meta itemprop='image'>
而不是<meta property='og:image'>
。它总是选择用于Facebook共享的Open Graph图像。
这是我的元标记:
<meta content="website" property="og:type">
<meta content="Something great" property="og:title">
<meta content="http://mywebsite.com/" property="og:url">
<meta content="My description blaah." property="og:description">
<meta content="http://mywebsite.com/img/image-fot-.png" property="og:image">
<meta content="Something great" itemprop="name">
<meta content="My description blaah." itemprop="description">
<meta content="http://mywebsite.com/img/image-for-googleplus.png" itemprop="image">
答案 0 :(得分:2)
您没有使用有效的schema.org标记。它应该包含在用户可见的HTML中,并且应该包含itemscope。 docs has a good example以及测试它是否为有效标记的最佳方法是使用Google's testing tool。
<body itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">Shiny Trinket</h1>
<img itemprop="image" src="{image-url}" />
<p itemprop="description">Shiny trinkets are shiny.</p>
</body>
答案 1 :(得分:0)
此脚本数据的模式数据:
<script type='application/ld+json'>
{
"@context": "http://www.schema.org",
"@type": "LocalBusiness",
"name": "website",
"url": "http://www.website.com/",
"logo": "http://www.website.com/images/logo.png",
"image": "http://www.website.com/images/dhaka-city.jpg",
"title": "Title of your website | website.com",
"description": "website.com is your online business directory of Country",
"address": {
"@type": "PostalAddress",
"streetAddress": "Road #21, Gulshan, Dhaka, Bangladesh ",
"addressLocality": "Gulshan",
"addressRegion": "Dhaka",
"postalCode": "1200",
"addressCountry": "Bangladesh"
},
"telephone": "+880123456789",
"geo": {
"@type": "GeoCoordinates",
"latitude": "23.783127",
"longitude": "90.394359"
},
"openingHours": "Su, Mo, Tu, We, Th, Fr 09:00-18:00",
"contactPoint": {
"@type": "ContactPoint",
"contactType": "Customer support & query",
"telephone": "+880123456789"
}
}
</script>
Google和其他共享媒体的打开图数据:
<meta property="og:title" content="Title of your website | website.com"/>
<meta property="og:type" content="Most popular business directory of Bangladesh"/>
<meta property="og:url" content="http://www.website.com/"/>
<meta property="og:image" content="http://www.moumaachi.com/images/dhaka-city.jpg"/>
<meta property="og:site_name" content="@website"/>
<meta property="fb:admins" content="Author"/>
<meta property="og:description" content="website.com is your online business directory of Country"/>