Asp.net 我想要的只是一个简单的类似Facebook的按钮
我无法在ASP.NET页面上使用类似Facebook的按钮。我尝试过使用FB开发者工具生成代码来显示like按钮,也尝试过使用AddThis,但都不起作用。以下是我尝试过的一些事情: 1) 由类似FB的按钮生成器生成,IFRAME样式Asp.net 我想要的只是一个简单的类似Facebook的按钮,asp.net,facebook,firefox,.net-4.0,addthis,Asp.net,Facebook,Firefox,.net 4.0,Addthis,我无法在ASP.NET页面上使用类似Facebook的按钮。我尝试过使用FB开发者工具生成代码来显示like按钮,也尝试过使用AddThis,但都不起作用。以下是我尝试过的一些事情: 1) 由类似FB的按钮生成器生成,IFRAME样式 <html> <body> <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.illuminephotos.co.uk%2Fblog.
<html>
<body>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.illuminephotos.co.uk%2Fblog.aspx&send=false&layout=standard&width=450&show_faces=true&action=like&colorscheme=light&font=segoe+ui&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
</body>
</html>
2) 由类似FB的按钮生成器生成,HTML5风格
<html>
<body>
<div id="fb-root"></div>
<script> (function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
} (document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="http://www.illuminephotos.co.uk/blog.aspx"
data-send="false" data-width="450" data-show-faces="true" data-font="segoe ui"></div>
</body>
</html>
(功能(d、s、id){
var js,fjs=d.getElementsByTagName[0];
if(d.getElementById(id))返回;
js=d.createElement;js.id=id;
js.src=“//connect.facebook.net/en_GB/all.js#xfbml=1”;
fjs.parentNode.insertBefore(js,fjs);
}(文档“脚本”、“facebook jssdk”);
3) 由AddThis生成(使用
块稍微修改为)
)以下是我如何让它在我创建的网站上运行的,包括Firefox:
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.mysite.com&send=true&layout=standard&width=450&show_faces=true&action=like&colorscheme=light&font=tahoma&height=80"
scrolling="no" frameborder="0" style="border: none; overflow: hidden;
width: 450px; margin-top:30px; padding-left:2px;
height: 80px;" allowtransparency="true"></iframe>
这是一个Adblock Plus问题。禁用该功能后,它在Firefox中也可以正常工作。我想我有一些很久以前遗留下来的额外反facebook过滤器,该死。这两个小部件在你的测试URL上的Chrome浏览器中都显示得很好。它们工作得很好,IE 7-9 alsoTrue,一定是Firefox的问题。我因为没有检查其他浏览器而责骂自己。。。但问题依然存在。如果这只是firefox的问题,你确定没有任何插件可能会破坏脚本吗?油嘴滑舌?Noscript?任何类似的东西?对我有用。Chrome和Firefox-Windows7.Yep就是这样。一个古老的LifeHacker提示阻止顽固的facebook广告,让我为一些facebook域名添加了一个过滤器。呵呵。
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.mysite.com&send=true&layout=standard&width=450&show_faces=true&action=like&colorscheme=light&font=tahoma&height=80"
scrolling="no" frameborder="0" style="border: none; overflow: hidden;
width: 450px; margin-top:30px; padding-left:2px;
height: 80px;" allowtransparency="true"></iframe>