Inviting Your users' Friends through Requests

Another way to get the attention of your users' friends is by sending those friends requests. Think of this as a way to allow your app's users to invite other of their friends to use your application in a personal, private manner. This is a method that you'll want to test, because it gives better results for some than others, and over time, this area has not been quite as used as others. Still, it is an additional way to get your users' attention, and you should take advantage of it.

Sending a request is mostly just a matter of sending a simple JavaScript FB.ui call as I describe in the sharing example above, or redirecting to the appropriate dialog box URL. Here's what your JavaScript for such a request would look like, using the Inspirations example:

<html> <body> <div id="fb-root_14_chapter-04"></div> <script src="http://connect.facebook.net/en_US/all.js" charset="utf-8"></script> <script> FB.init({appId: '169764986370463', status: true, cookie: true, xfbml: true}); </script> <h1>Inspirations</h1> <div id="quote_14_chapter-04"> <span id="facebook_stuff_14_chapter-04"> <div id="profile_pic_14_chapter-04"><fb:profile-pic uid="683545112"> </fb:profile-pic></div> <div id="profile_name_14_chapter-04"><fb:name uid="683545112" useyou="false"> </fb:name> </span> "When I examine myself and my methods of thought, I come to the conclusion that the gift of fantasy has meant more to me than any talent for abstract, positive thinking." -Albert ...

Get Facebook® Application Development For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.