Question: While searching the web, I found this code:

```
$apprequest_url ="https://graph.facebook.com/" .
        "/apprequests?ids=USERID_1,USERID_2,USERID_3" .
        "&message='INSERT_UT8_STRING_MSG'" . 
        "&data='INSERT_STRING_DATA'&"  .   
        $app_access_token . "&method=post";

```

Can anyone explain to me how this sends an app request? And how is it supposed to work? Do you add it to a button?

Answer: 
The URL is a Graph API endpoint, along with necessary options via the query string.

It works by a request being made to that URL, and Facebook will return the result of that Graph API call via the HTTP response.

For more info, you should do a little research on REST APIs. ;-)

As a side note as well, the code in ASHUTOSH's response bring up a dialog from which to send app requests via the FB javascript SDK, but then behind the scenes the SDK is merely wrapping a call/response to the Graph API anyway. You can check it out using Firebug for FF, or the other browser dev tools in Chrome, IE, etc. Just go into the Network tab and see the HTTP request being made by the browser.
You can send app request using javascript sdk.

```
<html>
<head>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
     <script type="text/javascript">
       FB.init({
         appId  :<?php echo $facebook_appid;?>,
         status : true, // check login status
         cookie : true, // enable cookies to allow the server to access the session
         xfbml  : true  // parse XFBML   
       });

function newInvite(){
                 var receiverUserIds = FB.ui({ 
                        method : 'apprequests',
                        message: 'Invite your Friends for Your App',

                 },
                 function(receiverUserIds) {
                          console.log("IDS : " + receiverUserIds.request_ids);
                        }
                 );
                 //http://developers.facebook.com/docs/reference/dialogs/requests/
            }
     </script>
</head>
<body>
<?php
//---your app code here-----
//to call the function,
echo "<script type='text/javascript'>newInvite();</script>"
?>
</body>
</html>

```

save the file as .php and run.
This should work! If it does,then accept the answer.
Happy coding!