(Quick Reference)

facebook:sendLink

Display a link to open Send Dialog .

The Send Dialog lets people to send content to specific friends. They'll have the option to privately share a link as a Facebook message, Group post or email.

<facebook:sendLink link="http://www.google.com" to="594317994">Send a link to a friend</facebook:sendLink>

To check if the app was successfully added or execute some code, you can use callback attribute.

<script>
    function someCallbackFunction(response) {
        alert('callback called!');
        if (response && response.success) alert('Sent successfully');
        console.log(response);
    }
</script>

<facebook:sendLink callback="someCallbackFunction" link="http://www.google.com" to="594317994"> Send a link to a friend </facebook:sendLink>

Attributes

Required attributes are :

  • link The link attached to this post.
  • to A user ID or username to which to send the message.

Optional attributes are :

  • callback Optional javascript function name to call when dialog is confirmed or closed.
  • disabled Disable click on the link.
  • description The description of the link (appears beneath the link caption). If not specified, this field is automatically populated by information scraped from the link, typically the title of the page.
  • elementClass HTML element 'class' attribute value.
  • elementId HTML element 'id' attribute value.
  • name The name of the link attachment.
  • picture The URL of a picture attached to this post. The picture must be at least 50px by 50px and have a maximum aspect ratio of 3:1.