我首先在Facebook上创建我的应用程序,然后我从Facebook获得代码为像按钮。你可以验证我的代码;
我正在使用HTML5版本;Asp.Net Facebook的按钮错误
<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_US/all.js#xfbml=1&appId=123456789";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
我的按钮码是:
<div class="fb-like" data-href="http://www.google.com.pk" data-send="false"
data-layout="button_count" data-width="450" data-show-faces="true"></div>
但是当我点击“喜欢按钮”,一个新的窗口弹出,几秒钟后,我得到了这个错误;
The webpage you are trying to viewing try to close the browser. Do you want to close the browser?
然后我按在IE10的F12后,我看到了“错误控制台” javascript的,我什么也没得到。
我也尝试过Chrome和FireFox,当我点击一个按钮时,按钮消失(在Firefox和Chrome中)。
What am I getting wrong?
Do I need an extra step in my Facebook App I-e developer.facebook.com