<fb:request-form/>
Renders a standard Facebook invite form. It must
include either an <fb:multi-friend-selector/>
tag or a combination of
<fb:
multi-
friend-input/>
or
<fb:
friend-
selector/>
tags and the
<fb:
request-
form-
submit/>
tag. FBML invite tags are one of the biggest reasons to base your
application on FBML instead of purely on
<iframe/> tags, as these invite tags can save
developers a lot of time producing a list of friends and necessary
calls to invite those friends. It should also be noted that FBML is
the most effective method of sending invites—these forms are the
only ways to invite a user’s friends to an app. To display a custom
form on your own, you may want to look into the notifications
API call.
type=[string
]
default: none
The name to include in the invite. It will
appear as something to the effect of “1
[type
] request” under “Requests”
in the upper-right corner of your main Facebook page. It has
a limit of 20 characters.
content=[string
]
default: none
The content of the request invitation to send to the friend(s) being invited.
invite=[true|false] default:
false
Specifies whether it is an invitation or a
request. The only difference is that if
true
, it says,
“[
” whereas if
name
] sent an
invitation using
[type
]:false
, it says,
“[
:”.name
] sent a request
using [type
]
action=[string
]
default:
http://apps.facebook.com/yourapp/null
The URL to redirect the user after they submit the form, or after they click “Skip” in the form.
method=[GET|POST] default:
POST
Specifies whether to submit the form via either the method GET or POST.
The following FBML example for the
<fb:request-form/>
tag comes from our
“Hello Friends” example in Chapter 1:
<fb:request-form action="index.php" method="POST" invite="true" type="FBML Essentials" content="Hello Friend. <fb:req-choice url='http://apps.facebook.com/fbmlessentials' label='Go there!'/>"> <fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use FBML Essentials."> </fb:request-form>
Here’s another example, this time using
<fb:multi-friend-input/>
and
<fb:request-form-submit/>
:
<fb:request-form action="index.php" method="POST" invite="true" type="FBML Essentials" content="Hello Friend. <fb:req-choice url='http://apps.facebook.com/fbmlessentials' label='Go there!'/>"> <fb:multi-friend-input width="350px" border_color="#8496ba" exclude_ids="4,5,10,15" /> <fb:request-form-submit/> </fb:request-form>
The first <fb:request-form/>
example
renders as shown in Figure 3-46.
The second <fb:request-form/>
example
renders as shown in Figure 3-47.
18.191.205.99