views:

1321

answers:

1

when i try to send invitations from my site, i am getting this error "req-choice required as part of request-form content". what does it mean? please help.

These are the details i gave when created application:

App. Name : mysitename
ConnectURL: http://www.mysite.com/

Below is the code i am using. Am i missing something?

<fb:serverfbml style="background-color:#F7F7F7;"> 
<script type="text/fbml">
<fb:fbml> 
<fb:request-form
    action='http://www.mysite.com/confirm.php'
    method='POST'
    invite='true'
    type='mysite'
    content='Come and join us. Visit us at http://www.mysite.com/'
    <fb:req-choice url='http://www.mysite.com/' label='Join'/> 
    <fb:multi-friend-selector
    showborder='false'
    actiontext='Invite your friends to join'
    rows='4'
    /> 
</fb:request-form> 
</fb:fbml>
</script> 
</fb:serverfbml>
+2  A: 

I believe your tag attributes are a bit out of order. The content attribute of an fb:request-form is a string that should contain the fb:request-choice tag. The best way to do this is to use double-quotes around the content attribute value, and single quotes for everything inside that. You need to re-organize your code like this:

<fb:request-form
    action="http://www.mysite.com/confirm.php"
    method="POST"
    invite="true"
    type="mysite"
    content="Come and join us. Visit us at http://www.mysite.com/
        <fb:req-choice url='http://www.mysite.com/' label='Join'/>
    "
>
    <fb:multi-friend-selector
        showborder="false"
        actiontext="Invite your friends to join"
        rows="4"
    />
</fb:request-form> 

Note how the fb:req-choice tag is actually inside the content attribute string.

zombat

related questions