2012-05-24 100 views
0

我有以下facebook sharer.php脚本在Facebook页面选项卡应用程序上运行。直到我尝试使用使用Facebook显示货币符号sharer.php

htmlentities(money_format("%10.2n", $numrows[price])) 

有趣的是添加一个货币符号 份额的伟大工程,这个股权是一个页面还有currecny符号上,而currecny符号可以正确显示

这里是完整的代码。提前

<?php 
    $title=urlencode(''.$numrows['title'].' | '. htmlentities(money_format("%10.2n", $numrows[price])).' '.$currency_code.''); 
    $url=urlencode(''.$token.''); 
    $summary=urlencode(''.$numrows['description'].''); 
    $image=urlencode(''.$numrows['img1'].''); 
?> 
<a id="button" onClick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[title]=<?php echo $title;?>&amp;p[summary]=<?php echo $summary;?>&amp;p[url]=<?php echo $url; ?>&amp;&p[images][0]=<?php echo $image;?>', 'sharer', 'toolbar=0,status=0,width=550,height=400');" target="_parent" href="javascript: void(0)"> 
<input type='submit' class='btn' title='Share This Item With Friends' value='Share On Facebook'></form> 
</a> 

谢谢,这已经快把我逼疯了数天的现在

回答

0

显示符号是一回事,但将它添加到一个查询字符串是完全不同的。 我不确定调用htmlentities(money_format(...))的结果是什么,因为我不是一个PHP程序员,但我的猜测是,您需要对它进行url编码以将其添加到查询字符串中,就像'=','? “和'&'。

虽这么说,你应该知道,Facebook的份额已被弃用,不再被支持,因为你可以在文档阅读:

的共享按钮,取而代之的Like按钮的被弃用,和 将不再受支持。只要 可能为您的应用带来最大流量,请使用Like按钮。

(参考:http://developers.facebook.com/docs/share/

和:

发生了什么事旧分享按钮?

我们弃用了分享按钮,当我们推出了Like按钮, 因为Like按钮允许用户 连接与点击,并让他们看到他们的哪些 朋友已经连接了提高点击率。

(参考:http://developers.facebook.com/docs/reference/plugins/like/

你应该切换等按钮,但有太多你需要URL编码的东西。