Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here it is the doc:</p> <ul> <li><a href="https://developers.facebook.com/docs/reference/dialogs/" rel="nofollow">https://developers.facebook.com/docs/reference/dialogs/</a></li> <li><a href="https://developers.facebook.com/docs/reference/dialogs/requests/" rel="nofollow">https://developers.facebook.com/docs/reference/dialogs/requests/</a></li> </ul> <p>You can either do that by using the JavaScript SDK, or the Graph API.</p> <p>To use the graph api, you can build an URL like this:</p> <pre><code>https://www.facebook.com/dialog/apprequests ?app_id=&lt;your-app-id&gt; &amp;redirect_uri=http://www.example.com/response/ &amp;message=Your%20message%20here &amp;display=popup </code></pre> <p>By specifying different values for "display", you can choose how to display the selector. Can be page, popup, iframe, touch, or wap.</p> <p>When the user clicks the "send request" button, gets redirected to "redirect_uri" with shome get appended (I wasn't able to find the exact name for the get parameter, but it would be easy to find out).</p> <h2>UPDATE:</h2> <p>After the user clicks on "Send request", he gets redirected to:</p> <pre><code>&lt;redirect_uri&gt;?request_ids[0]=XXXX&amp;request_ids[1]=YYYY&amp;request_ids[2]=ZZZZ#_=_ </code></pre> <p>So, in PHP, you'll find a list of ids of selected friends in <code>$_GET['request_ids']</code>. You can use that list to publish something on friends wall, by using the Graph API.</p> <p><strong>Side note:</strong> must have the same domain you specified as your site URL in the app configuration page.</p> <h2>UPDATE:</h2> <p>An improvement to your PHP code:</p> <pre><code>if (isset($_GET['request_ids'])) { for ($i=0; $i&lt;count(request_ids); $i++){ $link = ($link + "&amp;to=" + $request_ids[$i]); } echo "&lt;script language=javascript&gt;parent.location=''&lt;/script&gt;"; } </code></pre> <p>Then, what's inside <code>$link</code>? To publish on one's wall, you should use the appropriate Graph API request, directly from the script you specified in <code>redirect_uri</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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