案例 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.
拜托,谁能给我一个解决方案?