【发布时间】:2013-12-30 04:36:39
【问题描述】:
案例1:我使用这个代码:(来自http://blogzonebd.com/add-facebook-like-button-below-post-titles-in-blogspot-how-to/)
<iframe allowTransparency='true'
expr:src='"http://www.facebook.com/plugins/like.php?href=" + data:post.url + "&layout=button_count&show_faces=false&width=100& action=like&font=arial&colorscheme=light"'
frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:100px;
height:20px;'/>
当我点击“赞”时,会出现一个确认按钮,当我在出现的新弹出窗口中点击赞时,我会被重定向到https://www.facebook.com/plugins/error/like/confirm
案例 2。我使用来自 facebook 开发人员的 iframe:
<iframe src="//www.facebook.com/plugins/like.php?href=data:post.url&send=false&layout=standard&width=450&show_faces=true&action=like&colorscheme=light&font&height=80&appId=324750880918583"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px;
height:80px;" allowTransparency="true"></iframe>
href下使用的data:post.url给我的不是博客的url,而是字符串本身。
案例3,我从案例2的链接中尝试了XFBML版本,部分代码为:
<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&appId=324750880918583";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
这是博主在我尝试保存模板时显示的错误。
Error parsing XML, line 1201, column 68: The reference to entity "appId" must end with the ';' delimiter.
请问,谁能给我一个解决方案?
【问题讨论】: