Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>OK, we found a workaround. The general idea:</p> <ol> <li>Display the Feed Dialog inline as an iframe (by specifying <code>display=iframe</code>)</li> <li>Create your own custom control for selecting a recipient Facebook username or id</li> <li>Reload the iframe asynchronously upon selecting a recipient or onblur, etc</li> </ol> <p>Some caveats/reasoning for above:</p> <ul> <li>You can't use the JS SDK because it will launch the iframe version of the Feed Dialog as a modal lightbox (rather than inline in your page flow)</li> <li>You'll need to implement a redirect page that does post processing, such as updating the state of the parent window, logging results, etc</li> <li>For (2), the custom control can be as simple as a text input field, but you'll probably want at least some sort of autocomplete. This is actually not too tricky, as you grab your user's friend list with the <a href="https://graph.facebook.com/me/friends" rel="nofollow">https://graph.facebook.com/me/friends</a> Graph API call.</li> </ul> <p>Here's a basic example using a simple text input:</p> <pre class="lang-html prettyprint-override"><code>&lt;html&gt; &lt;head&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt; Recipient's FB username: &lt;input type="text" id="fb-recipient" placeholder="Recipient's FB username"&gt;&lt;/input&gt; &lt;input type="submit" id="fb-recipient-submit" value="Pick" /&gt; &lt;/div&gt; &lt;iframe id="fb-feed-dialog" width="586" height="330" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt; &lt;script&gt; $('#fb-recipient-submit').click(function(e){ e.preventDefault(); var feedUrl = 'https://www.facebook.com/dialog/feed?'; feedUrl += 'display=iframe'; feedUrl += '&amp;app_id=' + 'YOUR_APP_ID'; feedUrl += '&amp;access_token=' + 'ACCESS_TOKEN'; feedUrl += '&amp;link=' + 'SHARE_LINK'; feedUrl += '&amp;redirect_uri=' + 'REDIRECT_URI'; feedUrl += '&amp;to=' + $('#fb-recipient').val(); $('#fb-feed-dialog').attr( 'src', feedUrl ); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>You can find a screenshot of a slightly more fleshed out solution at: <a href="http://i.imgur.com/0jTM391.png" rel="nofollow">http://i.imgur.com/0jTM391.png</a></p>
    singulars
    1. This table or related slice is empty.
    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.
 

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