Archive for the ‘Facebook Application Development’ Category.

How to send Invite/Request from your facebook iframe application to all your friends in 10 minutes

Creating an invitation/request page from an iframe application page is fairly easy, but I could not find a single place with all the required steps. So thought of noting it down for my own and others use.

1. From the applications settings page(Advanced Settings) disable the Sandbox mode

2. You need to enable Communication Between Your Site and Facebook as per the following document :
http://wiki.developers.facebook.com/index.php/Connect/Setting_Up_Your_Site

3. You need to set Connect URL. This is an unnecessary looking but a very important step, even if you do not have a facebook connect site.

4. Finally the code :

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<body>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
FB.init("<APPLICATION KEY>", "fb/xd_receiver.htm");
</script>
<fb:serverFbml style="width: 755px;">
    <script type="text/fbml">
      <fb:fbml>
          <fb:request-form
                    action="http://www.edostee.com/fb/"
                    method="POST"
                    invite="false"
                    type="<APPLICATION NAME>"
                    content="REQUEST CONTENT <a href='http://apps.facebook.com/edostee/'>eDostee</a> - fastest growing and brand new Indian Dating application
                 <fb:req-choice url='http://apps.facebook.com/edostee'
                       label='Join eDostee' />
              "
              >
                    <fb:multi-friend-selector
                    showborder="false"
                    actiontext="Invite your friends to join eDostee.">
        </fb:request-form>
      </fb:fbml>

    </script>
  </fb:serverFbml>
  </body>
  </html>

Above page will be rendered as below