我使用的是wordpress,我的facebook分享按钮代码可以在IE和Firefox上使用,而不是Chrome或Firefox。
下面是我从Facebook网站上摘录的代码:https://developers.facebook.com/docs/plugins/share-button/
在header.php中我有:<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
我在single.php上有:<fb:share-button type="box_count" href="http://<?php echo($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);?>"></fb:share-button>
我做错了什么?
示例:http://worldinsport.com/calcio-fiorentino-a-bruising-anarchic-and-exhilarating-spectacle-of-sport/
谢谢
发布于 2014-01-09 01:20:24
试试这个:
<div class="fb-share-button" data-href="http://<?php echo($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);?>" data-type="button_count"></div>或
<a href="#" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href)+'&t=whole description whatever you want to write here','','width=626,height=436'); return false;">
<img alt="Share on Facebook" src="/imagesico-facebook-2.png"></a>https://stackoverflow.com/questions/21002267
复制相似问题