【问题标题】:addthis share vs custom share button添加此共享与自定义共享按钮
【发布时间】:2013-11-07 13:37:27
【问题描述】:

我需要向我的网站添加共享功能。

这个 php 页面应该允许用户在社交网络上分享我的网站,但我需要设置自定义 url、标题、描述和图像。

我曾尝试使用 addthis 共享按钮,但我不确定是否可以完全自定义按钮...对吗?

还有其他类似的服务吗?或者在我的情况下,最好添加带有 facebook api、twitter api 的分享按钮..?

这是addthis分享代码:

<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xx"></script>

【问题讨论】:

    标签: share addthis


    【解决方案1】:

    您可以通过在工具箱 HTML 中指定 addthis:title、addthis:url 和 addthis:description 标签来设置自定义标题、url 和描述,如下所示:

    <div class="addthis_toolbox addthis_default_style addthis_32x32_style"
        addthis:url="http://example.com"
        addthis:title="An Example Title"
        addthis:description="An Example Description">
    

    但是,Facebook 和其他一些服务不尊重发送给他们的值,并在您的页面上抓取 og:title、og:url 和 og:description 标签。为了安全起见,请在您的 AddThis 代码中指定上述内容,并为您的 og 标签指定相同的值。您可以在此处阅读有关 og 标签的更多信息:

    http://www.addthis.com/blog/2012/09/27/debugging-sharing-to-facebook

    【讨论】:

      【解决方案2】:

      你可以试试这个:你可以试试这个:http://sharebuttongenerator.aakilfernandes.com/

      【讨论】:

        猜你喜欢
        • 2013-08-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-04-09
        • 1970-01-01
        相关资源
        最近更新 更多