Google+分享未填充图片,标题,说明

时间:2014-08-31 18:26:41

标签: google-plus

我正在尝试在我的网站上使用Google+分享。我正在使用一个锚标记。

<a target="_blank" id="btnGoogleShare" href="#" runat="server">
Google+</a>

在后面的代码中我将Href设置为

btnGoogleShare.Href = "https://plus.google.com/share?url=[My site url]/page?_i=10"

我在头标记

中添加了以下标记
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
</script>   
<meta itemprop="name" content="Sample Title">
<meta itemprop="description" content="Sample Description">
<meta itemprop="image" content="[My site url]/SampleImage.jpg">
<meta property="og:type" content="website">
<meta property="og:url" content="https://plus.google.com/share?url=https://plus.google.com/share?url=http//:MySite.com/page?_i=10>
<meta property="og:title" content="Sample Title">
<meta property="og:description" content="Sample Description">
<meta property="og:image" content="[my site URL]/SampleImage.jpg">

我在visual studio中的localhost上运行我的网站。当我点击链接时,我只在谷歌加分享对话框中获取网址。标题,描述,图像不填充。任何的想法?可能是因为我在visual studio中使用localhost在dev环境中运行?

1 个答案:

答案 0 :(得分:1)

  

我在visual studio的localhost中运行我的网站。

通过获取页​​面并通过Google服务器解析详细信息,

Google+填充该字段。如果该网址未在互联网上公开访问,则Google+信息共享只会显示该网址。