Facebook: send an app invitation

Alexis Dufrenoy picture Alexis Dufrenoy · May 20, 2011 · Viewed 10.8k times · Source

How can I send an invitation to use an app with Graph API? I looked at the reference, and can't find something that fits. Any clue?

Answer

amit_saxena picture amit_saxena · May 22, 2011

A HTML/javascript example:

<html>
  <head>
  <title>My Great Website</title>
  </head>
  <body>
  <div id="fb-root"></div>
  <script src="http://connect.facebook.net/en_US/all.js">
  </script>
  <script>
    FB.init({ 
      appId:'YOUR_APP_ID', cookie:true, 
      status:true, xfbml:true 
    });

    FB.ui({ method: 'apprequests', 
      message: 'Here is a new Requests dialog...'});
  </script>
  </body>
</html>

You can associate the javascript to click event of a link, etc.

You can find the details here:
http://developers.facebook.com/blog/post/464/