Back to News for Developers

The Send Dialog, for Integrated Private Sharing

June 16, 2011ByRavi Grover

With the recent introduction of the Send button, people now have a simple way to privately share links from the websites they visit. Whereas the Like button lets people share with all their friends, the Send button lets them share with specific people and groups. In the first thirty days after its launch, over 100,000 websites have added the Send button.

Building on the popularity of the Send button, today we’re introducing another way for developers to let people share private content – the Send Dialog. It resembles the Feed Dialog, but gives people the ability to share a link as a private Facebook message, email or Group post. The Send Dialog is better than the Send button for deep integrations because it enables developers to build sending messages into the core flow of their website or app.

The new dialog was designed for activities that a user may want to only share with specific people, which makes it particularly useful for ecommerce, travel, and event websites. You can see the Send Dialog today on Airbnb, Gogobot, Keepsy, Jetsetter, SniqueAway, and Viagogo. These sites use the new dialog to let you tell friends about products, get advice, and coordinate plans. For example, Keepsy’s integration lets you build a custom photo album and send a message to the friends in the photos.

Facebook Messages are intended for high quality conversations between friends, not impersonal, unwanted messages. Apps on Facebook should use Requests to let people communicate in-game status, invite friends to use an app, or send messages to multiple people. The Send Dialog is appropriate when a person might otherwise send a personal email.

The dialog does not require special user permissions and can be integrated using our standard Platform Dialog framework. You can generate the Send Dialog with the following sample code:

<html xmlns:fb="http://www.facebook.com/2008/fbml">
  <body>
    <script src="http://connect.facebook.net/en_US/all.js"></script>
    <div id="fb-root"></div>
    <script>
      // assume we are already logged in
      FB.init({appId: '123050457758183', xfbml: true, cookie: true});

      FB.ui({
          method: 'send',
          name: 'Facebook Dialogs',
          link: 'https://developers.facebook.com/docs/reference/dialogs/'
          });
     </script>
  </body>
</html>

This displays an iframe to users that have authorized your application and a similar popup window to non-users:

Alternatively, you can direct people to the dialog on Facebook:

http://www.facebook.com/dialog/send?
    app_id=123050457758183& 
    name=Facebook%20Dialogs&
    link=http://developers.facebook.com/docs/reference/dialogs/&
    redirect_uri=http://www.example.com/response/

We're thrilled with the early adoption of the Send button and hope the Send Dialog further enables developers to build social experiences that are optimized for their specific products and industries. You can learn more about the Send Dialog on the Developer Site.


Tags: