So far, what we have learnt is just the basic structure of a Facebook application including page navigation and form processing. However, one would expect a Facebook application will have features that are integrated with their Facebook experience. For example, the application should somehow connect the user with their friends, say by telling the user's friends what he/she is doing, sharing his/her comments or sending invitations.

So, starting from this part, we will learn how our application can connect the user with his/her friends.

 

Sending Requests / Invitations - fb:request-form and fb:multi-friend-selector

I believe you have been receiving requests and invitations from your friends (which actually were sent out by the applications that your fiends used).

The easiest way to do this in our application is to use the <fb:request-form> and <fb:multi-friend-selector> tags. This will simply create Facebook's standard "Friend-Selector" form that allow user to select to whom the request/invitation should be sent to.

Sample screen of the form is shown below:

The code used for generating the above form is:

<fb:request-form
action="index.php"
method="POST"
invite="true"
type="eLearning"
content="Let's learn Facebook App Development. <?php echo htmlentities("<fb:req-choice url=\"index.php\" label=\"Accept\"")?>" >
<fb:multi-friend-selector showborder="true" max="10" actiontext="Select your IT friends.">
</fb:request-form>

 

Further Readings

After learning the basic skill in sending requests, as usual, please refer to the official documentation for the details of these FBML tags.