Thursday, April 4, 2013

send request from app to user using javascript


<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:fb="https://www.facebook.com/2008/fbml">
  <head>
    <title>MyNTU Request</title>
  </head>
  <body>
    <div id="fb-root"></div>

    <script src="http://connect.facebook.net/en_US/all.js"></script>

    <script>

      FB.init({
        appId  : 'xxxxxxxxxxx',    //your app id
        frictionlessRequests: true
      });
  
      FB.ui({method: 'apprequests',
          message: 'My Great Request',
          to: 'xxxxxx'                    //user id you want to send to
        }, requestCallback);
      function requestCallback(response) {
        // Handle callback heres
      }
    </script>
  </body>
</html>

No comments:

Post a Comment