The Share button lets people add a personalized message to links before sharing on their timeline, in groups, or to their friends via a mobile app.
If your website doesn't need a button to open share dialog or our website provided button doesn't fit into your website design, Web Share Dialog is also provided for sharing links. Note that you do not need to implement any addition changes on your profile to use this plugin.
Pick the URL of a website you want to share.
Paste the URL to the Code Configurator, adjust the button size of your share button and put a custom messge to share. Codes are automatically generated.
Copy and past the snippet into the HTML of the destination website.
Copy and past the following code just before the closing <body> tag of your HTML.
Copy and past the following code where you want the button to render.
Copy & paste the code example to your website. Adjust the value data-href to your website URL. Next use the data-size to adjust your button size. Finally, use data-title to set your website title or content that should appear on your post update.
Setting | HTML5 Attribute | Description | Default |
---|---|---|---|
href | data-href | The absolute URL of the page that will be shared. | HTML5 versions default to the current page URL. |
content | data-title | Content to be share along with the link. | HTML5 versions default to the current page title |
size | data-size | Selects one of the different button sizes that are available for the plugin. Can be either "small", "medium", or "large". | small |
The Share dialog gives people the ability to publish an individual story to their timeline, a friend's timeline, a group, or in a private message on Messenger. This does not require our website Login or any extended permissions, so it is the easiest way to enable sharing on the web.
To share a link: