我tryimg嵌入使用来自FB开发者页面的HTML和JS SDK源的网页中的Like/Share按钮,但在Web控制台中出现以下错误中的错误:资源错误嵌入FB像按钮
加载资源失败:在此服务器上找不到请求的URL。 file://connect.facebook.net/en_US/all.js#xfbml=1
任何输入赞赏。
夏兰
代码的请求:
<!--LOAD FACEBOOK JSSDK FOR LIKE ETC-->
<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 = "http://connect.facebook.net/en_US/all.js#xfbml=1&appId=113830492072210";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!--FACEBOOK LIKE-->
<div class="fb-like" data-href="http://www.mooneycallans.com" data-send="false" data-layout="button_count" data-width="50" data-show-faces="false" data-colorscheme="dark" data-font="verdana"></div>
我用的ID是从https://developers.facebook.com/docs/plugins/like-button/的FB页面提供的缺省。
也适用于JS小提琴: http://jsfiddle.net/
后insertmg prefox HTTP: 的src网址(::文件//connect.facebook.net/en_US/all.js#xfbml=1现在HTTP)前我仍然得到respurce错误:
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains
混乱...
你能告诉我们一些代码吗 –