我希望这没问题。
我有以下fb:serverfbml片段。
<fb:serverfbml id="invite_friends_form" style="width: 100%">
<script type="text/fbml">
<fb:fbml><p>Testing FBML rendering</p></fb:fbml>
</script>
</fb:serverfbml>
<script>
$(document).ready(function()
{
// Parse XFBML tags
FB.XFBML.parse();
});
</script>它可以在Firefox和Chrome中正确渲染。我得到了常见的Facebook加载动画片刻,然后显示句子“测试FBML渲染”。
但是,当我在Opera10和Internet Explorer8上测试它时,它不能工作。我确实看到了Facebook正在加载动画,但它一直没有完成。当我看到我的网络监视器时,我看到了一个对http://www.facebook.com/plugins/serverfbml.php的请求,查询字符串中传入了我要呈现的FBML。
有没有人知道,问题出在哪里?
谢谢,Andree。
发布于 2010-11-30 19:55:55
整个上午我都遇到了同样的问题,我终于解决了它!:)
添加:
<div id="fb-root"></div>...some放置在你的身体里。
另外,将xmlns:fb="http://www.facebook.com/2008/fbml“添加到html标记,这样它就会显示为:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">我将发布我的全部代码,以便您可以进行比较:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title></title>
</head>
<body style="margin:0px 0px 0px 0px;overflow:hidden;text-align:center;">
<div id="fb-root"></div>
<fb:serverFbml>
<script type="text/fbml">
<fb:fbml>
<fb:request-form
method="POST"
type="jugar a Mahou Liga Chapas"
action="http://mahouligachapas.unusualwonder.com"
content='¿ Te echas un partido conmigo?
<fb:req-choice url="http://apps.facebook.com/mahouligachapas" label="Sí" />
<fb:req-choice url="http://www.facebook.com" label="No" />'
>
<fb:multi-friend-selector actiontext="Invita a tus amigos a jugar a Mahou Liga Chapas"/>
</fb:request-form>
</fb:fbml>
</script>
</fb:serverFbml>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="http://connect.facebook.net/es_ES/all.js"></script>
<script type="text/javascript">
$(document).ready(function () {
FB.init({ appId: 'XXXXXXXXXXX', status: true, cookie: true, xfbml: true });
});
</script>
</body>
</html>发布于 2011-02-03 18:49:39
我也有同样的问题。但在可能的情况下动作参数包含“(双引号)。当我添加斜杠时问题就消失了。
https://stackoverflow.com/questions/3228876
复制相似问题