Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google plus 谷歌+;共享不填充图像、标题、描述_Google Plus - Fatal编程技术网

Google plus 谷歌+;共享不填充图像、标题、描述

Google plus 谷歌+;共享不填充图像、标题、描述,google-plus,Google Plus,我正在尝试在我的网站上使用Google+共享。我使用一个锚标签 <a target="_blank" id="btnGoogleShare" href="#" runat="server"> Google+</a> 我在head tag中添加了以下标记 <script type="text/javascript" src="https://apis.google.com/js/plusone.js"> </script> <meta

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

<a target="_blank" id="btnGoogleShare" href="#" runat="server">
Google+</a>
我在head tag中添加了以下标记

<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中运行我的网站


Google+通过获取页面并通过Google服务器解析细节来填充字段。如果该URL不是实时的,并且不能在互联网上公开访问,Google+共享将只显示该URL。

谢谢亚伯拉罕,我没有意识到这一点。所以这意味着,若我将更改部署到服务器,那个么之后它将自动选择所有正确的信息,或者我需要做任何其他事情。我写的代码可以吗?如果需要更改,请提出建议。只要您按照说明进行操作,就可以了。部署更新后,您可以使用进行测试。
<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">