1

我有一堆 AddThis 共享按钮,在有人订阅我的电子邮件列表后显示。

我想为 Google Plus 添加一个分享按钮,但它不起作用。

例如,要放置我自己的 LinkedIn 按钮,我使用以下内容,它就像一个魅力:

<a class="addthis_button_linkedin"><img src="img/linkedin.png" width="64" height="64" alt="Share to LinkedIn"></a>

但是,当我对自定义 Google+ 按钮执行相同操作时,会出现两个按钮。这是我的标记:

<a class="addthis_button_google_plusone"><img src="img/googleplus.png" width="64" height="64" alt="Share to Google+"></a>

这是图片:http: //goo.gl/9lILs

有没有人遇到过这个问题?AddThis 支持论坛没有回应。

如果 API 不支持它,有没有办法破解某些东西?喜欢将小图形隐藏在大图形后面?

[编辑] 我可以使用 css 移动其他图标以覆盖小 Google+ 图标,但它看起来很草率:http: //goo.gl/d68eg

4

2 回答 2

4

您可能想要使用该addthis_button_google_plusone_share按钮。

于 2012-03-26T18:42:31.530 回答
0

以下是我使用 PHP 和 HTML 滚动自己的共享按钮的方法:

    <div class="sharing_buttons">
        <a class="google_plusone sharing" href="https://plus.google.com/share?url=http://YOUR_URL" target="_blank" title="Share on Google+"></a>
        <a class="facebook sharing" href="http://www.facebook.com/sharer.php?u=http://YOUR_URL" target="_blank"title="Share on Facebook"></a>
        <a class="twitter sharing" href="http://twitter.com/home?status=YOUR TWEET GOES HERE" target="_blank" title="Share on Twitter"></a>
        <a class="linkedin sharing" href="http://www.linkedin.com/shareArticle?mini=true&url=
        <?php echo urlencode('YOUR_URL'); ?>
        &title=<?php echo urlencode('YOUR TITLE HERE'); ?>
        &summary=<?php echo urlencode('WRITE A SUMMARY HERE (SPACES WILL BE ENCODED)'); ?>
        &source=<?php echo urlencode('@4click'); ?>" target="_blank" title="Share on LinkedIn"></a>
        <a class="button_email sharing" href="mailto:?subject=YOUR SUBJECT&body=BODY OF THE EMAIL" target="_blank" title="Share via e-mail"></a>
    </div>

图标图形是使用 CSS 添加的。例如:

.google_plusone { background:url(../img/sharing_sprite.png) 0px 0px; }

此解决方案的限制是您没有 AddThis 提供的跟踪功能,但我使用 HootSuite 跟踪我的社交分享,所以这对我来说没什么大不了的。

于 2012-11-14T20:14:47.460 回答