2

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?

Nicolo77
  • 1,825
  • 4
  • 24
  • 34

1 Answers1

1

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.

DMCS
  • 31,720
  • 14
  • 71
  • 104
  • Does not answer the question since this problem does not rely on invite actions but on any XFBML tags. See https://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/ – brainondev Sep 11 '12 at 14:30
  • Huh? XFMBL is NOT the same as FBML. FBML has become deprecated and is not longer used. XFBML is still around. However, the code in the question above will no longer work. You will need to use the requests dialog. – DMCS Sep 11 '12 at 22:50