Php 在google plus上共享链接以及标题、图像和描述

Php 在google plus上共享链接以及标题、图像和描述,php,Php,我想在Google plus帖子上分享一个带有标题、图片和描述参数的链接。 但即使是这个简单的代码也不适合我 问题在于: 没有显示图像, 标题未显示, 说明未显示 出于测试目的,这里是本代码的站点链接。 基本页 您的href标签没有共享到google plus的正确链接: 您共享的链接是:这将导致404错误页面 因此,您可以使用以下链接: <a href="https://plus.google.com/share?url=http://www.getreferralace.com/g

我想在Google plus帖子上分享一个带有标题、图片和描述参数的链接。 但即使是这个简单的代码也不适合我

问题在于: 没有显示图像, 标题未显示, 说明未显示

出于测试目的,这里是本代码的站点链接。


基本页

您的href标签没有共享到google plus的正确链接:

您共享的链接是:这将导致404错误页面

因此,您可以使用以下链接:

<a href="https://plus.google.com/share?url=http://www.getreferralace.com/gonawazgo.php" target="_blank" class="gplus-counter" id="gplus_share">Share</a>

未显示说明。 其他一切都很好

<html>
    <head>
    <title>Basic page</title>
    <link rel="canonical" href="http://www.getreferralace.com/gonawazgo.php" />
    <meta property="og:title" content="This is Referral Ace" />
    <meta property="og:description" content="This is decription for Referral Ace" />
    <meta property="og:url" content="http://www.getreferralace.com/gonawazgo.php" />
    <meta property="og:image" content="http://www.getreferralace.com/campaign_images/Tulips.jpg" />
    <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
    </script>
    </head>
    <body class="body_style" itemscope itemtype="http://schema.org/Product">
    <div class="abc" style="display: none;">
     <h1 itemprop="name">Title Pizza</h1>
      <img itemprop="image" src="http://www.getreferralace.com/campaign_images/Tulips.jpg" />
      <p itemprop="description">This is decription for Referral Ace</p>
    </div>
    <a href="https://plus.google.com/share?url=http://www.getreferralace.com/gonawazgo.php" target="_blank" class="gplus-counter" id="gplus_share">Share</a>
    </body>
    </html>
    </html>

基本页
标题比萨饼

这是对推荐Ace的描述


我在这里没有看到图像标签。嘿,donald123,它能用吗?现在我也添加了图像标签,但仍然不能用。对我来说没问题。。也许是错误的url?谢谢你的回答,它几乎成功了。但是没有描述。@MaqsoodAhmad这很好。只是一个问题,你为什么不用像这样的东西?我不明白。您能解释一下吗?代码段正在运行,但未显示说明。
<html>
    <head>
    <title>Basic page</title>
    <link rel="canonical" href="http://www.getreferralace.com/gonawazgo.php" />
    <meta property="og:title" content="This is Referral Ace" />
    <meta property="og:description" content="This is decription for Referral Ace" />
    <meta property="og:url" content="http://www.getreferralace.com/gonawazgo.php" />
    <meta property="og:image" content="http://www.getreferralace.com/campaign_images/Tulips.jpg" />
    <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
    </script>
    </head>
    <body class="body_style" itemscope itemtype="http://schema.org/Product">
    <div class="abc" style="display: none;">
     <h1 itemprop="name">Title Pizza</h1>
      <img itemprop="image" src="http://www.getreferralace.com/campaign_images/Tulips.jpg" />
      <p itemprop="description">This is decription for Referral Ace</p>
    </div>
    <a href="https://plus.google.com/share?url=http://www.getreferralace.com/gonawazgo.php" target="_blank" class="gplus-counter" id="gplus_share">Share</a>
    </body>
    </html>
    </html>