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?
These are the details I gave when I 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>
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.
精彩评论