Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Actually <code>mikeonrails</code> gave a correct link - the Requests dialog is <em>the</em> way to invite friends to your app and send them other types of requests. It <em>does</em> require user interaction though (just as the video shows), for requests sent to users who don't have the application installed.</p> <p>And now for the details. There are 2 types of requests that you can send:</p> <ul> <li>user-generated requests: these can be sent to users who don't have the application installed (ie. application invite). They can <em>only</em> be sent using the Javascript SDK (or the iOS or Android SDKs but I don't think you're interested in those) and they <em>do</em> require user interaction. It will consist of a pop-up that will either display a selection (made by you) of his friends or a friend selector and a send button to send them your message.</li> <li>app-generated requests: these can <em>only</em> be sent to users who have the application installed, but can be sent without user interaction.</li> </ul> <p>The code for user-generated requests is like this (using the Javascript SDK):</p> <pre><code>// this will show the pop-up dialog with a friend selector // add a `to: 'friend_id1,friend_id2` to skip the friend selector FB.ui({ method: 'apprequests', message: 'My Great Request' }, requestCallback); </code></pre> <p>For the app-generated requests you can use Koala like this:</p> <pre><code>user = Koala::Facebook::API.new(user_token) user.put_object("user_with_app_installed_id", "apprequests", {:message =&gt; "Would you like to be friends?") </code></pre> <p>So, the conclusion is that you cannot invite a user's friends to your application without his approval, but you can make it really simple for him to do it (2 clicks).</p> <p>If you'd like to read more:</p> <ul> <li>Requests Dialog: <a href="http://developers.facebook.com/docs/reference/dialogs/requests/" rel="noreferrer">http://developers.facebook.com/docs/reference/dialogs/requests/</a></li> <li>Social Channels: <a href="http://developers.facebook.com/docs/channels/#requests" rel="noreferrer">http://developers.facebook.com/docs/channels/#requests</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload