fb:serverfbml不会在Opera和IE上呈现 [英] fb:serverfbml won't render on Opera and IE

查看:153
本文介绍了fb:serverfbml不会在Opera和IE上呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Facebook开发人员论坛中询问了同样的问题,但是出于某些原因,我想在此重新发布。我希望没关系。

I asked the same question in Facebook developer forum, but for some reasons I want to repost it here. I hope that's okay.

我有以下fb:serverfbml片段。

I have the following fb:serverfbml snippet.

<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渲染这句话。

It renders correctly in Firefox and Chrome. I got the usual Facebook loading animation for a moment, and then the sentence "Testing FBML rendering" is displayed.

但是,当我在Opera 10和Internet Explorer上测试时8,它不起作用。我确实看到Facebook加载动画,但它从未完成。当我看到我的网络监视器时,我看到了 http://www.facebook.com/的请求plugins / serverfbml.php ,我的待渲染FBML在查询字符串中传递。

BUT, when I test this on Opera 10 and Internet Explorer 8, it doesn't work. I do see the Facebook loading animation, but it never finished. When I see my network monitor, I saw a request to http://www.facebook.com/plugins/serverfbml.php with my to-be-rendered FBML passed in the query string.

请求已经完成并且来自facebook的响应正确,但仍然会加载动画。

The request is already completed with proper response from facebook, but still, the loading animation goes on.

有谁知道,这里可能出现什么问题?

Does anyone know, what might be the problem here?

谢谢,Andree。

推荐答案

我整个上午都有同样的问题,我终于解决了! :)

I have had the same problem for the whole morning, and I finally solved it! :)

添加:

<div id="fb-root"></div>

...在你体内的某个地方。

...some place inside your body.

另外,将xmlns:fb =http://www.facebook.com/2008/fbml添加到html标记中,使其显示为:

Also, add xmlns:fb="http://www.facebook.com/2008/fbml" to the html tag, so that it reads:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">






我要发布我的整个代码所以您可以比较:


I'm going to post my whole code so that you can compare:

<!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>

这篇关于fb:serverfbml不会在Opera和IE上呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆