我需要给我的网站添加一个分享功能。
这个php页面应该允许用户在社交网络上分享我的网站列表,但我需要设置一个自定义的url,标题,描述和图像。
我已经尝试了添加此共享按钮,但我不确定是否有可能完全自定义按钮…对吗?
还有其他类似的服务吗?或者在我的情况下更好地添加facebook api,twitter api的分享按钮,..?
这是addthis share代码:
<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>发布于 2013-11-18 05:40:40
您可以通过在工具箱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
发布于 2014-02-19 03:32:36
你可以试试这个:你可以试试这个:http://sharebuttongenerator.aakilfernandes.com/
https://stackoverflow.com/questions/19837406
复制相似问题