从网站分享帖子到Google +

时间:2016-12-11 05:25:08

标签: php google-plus

我正在尝试将我的网站帖子分享到Google plus。我使用下面的代码来实现这一点:

<a href="https://plus.google.com/share?url=<?php echo urlencode(url());?>" class="btn btn-danger" target="_blank" title="Google +"><i class="fa fa-google-plus"></i> share</a>

以及我使用的是meta标签:

<meta itemscope itemtype="<?php echo url();?>"/>
<meta itemprop="name" content="<?=$title;?>"/>
<meta itemprop="description" content="<?=strip_tags(substr($post['post_content'],0,1000 ));?>"/>
<meta itemprop="image" content="<?php echo $imagePath;?>"/>

它分享了正确的帖子标题和说明,但没有分享该帖子的正确图片。

任何人都可以帮我找出我需要改变的内容吗?

提前感谢您的关注。

0 个答案:

没有答案