问题描述
我们在网站的一部分中使用了Facebook分享按钮.我们曾经能够更改按钮的文本,但似乎不再可能.
We use the facebook share button in a part of our website. We used to be able to change the text of the button but it seems to be no longer possible.
我们现在拥有的代码是:
The code we have right now is:
<a name="fb_share" type="button" share_url="http://<?=$_SERVER["SERVER_NAME"]?><?=$_SERVER["REQUEST_URI"]?>"></a>
我们需要修改按钮,例如说分享此产品",而不只是分享.
We need to modify the Button so say "Share this product" instead of just share.
谢谢
推荐答案
不建议使用共享"按钮,而应该使用馈送对话框"以及您自己的自定义按钮设计.这是一个示例:
The Share button is deprecated, instead you should use the Feed Dialog along with your own custom design of button. Here is an example:
<a href="https://www.facebook.com/dialog/feed?app_id=123050457758183&link=https://developers.facebook.com/docs/reference/dialogs/&picture=http://fbrell.com/f8.jpg&name=Facebook%20Dialogs&caption=Reference%20Documentation&description=Using%20Dialogs%20to%20interact%20with%20users.&redirect_uri=http://www.example.com/response">Share this product</a>
显示为:
如您所见,它确实很容易创建并且受到实际支持,因此我强烈建议您进行切换.
As you can see, it's really easy to create and is actually supported, so I highly recommend switching.
这篇关于带有自定义文本的FB共享按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!