开发者

FB.XFBML.parse not working to reload FBML

开发者 https://www.devze.com 2023-03-28 00:27 出处:网络
I load the following with an AJAX request. It works fine with non-ajax requests. <div class=\'center\' id=\'fb_invite_box\'>

I load the following with an AJAX request. It works fine with non-ajax requests.

<div class='center' id='fb_invite_box'>
    <fb:serverfbml width="646" id="serverFbml">
          <script type="text/fbml" id="textFbml">
            <fb:request-form method='post' action='<%=invites_url%>' type='test' invite='true' content="test text">
                <fb:multi-friend-selector actiontext='Invite your friends to my app!' rows='3' cols='4' import_external_friends='false' email_invite='true'/>
            </fb:request-form>
          </script>    
    </fb:serverfbml>
</div>

I run this from what I learned about rendering FBML after an ajax 开发者_开发问答request.

FB.XFBML.parse(document.getElementById('fb_invite_box'));

I get this error:

<fb:serverfbml> requires the "fbml" attribute.

Am I missing something? Why doesn't this work?


Since FBML is being deprecated (https://developers.facebook.com/docs/reference/fbml/) very soon, I'd suggest using the new https://developers.facebook.com/docs/reference/dialogs/requests/ Requests Dialog to invite people to your app.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号