The share button provides an easy to use access into the Facebook share dialog, as well as some other functionality such as the button counter.
There are essentially three ways to call the share dialog. through the provided Facebook button, Javascript of a link.
Can also invoke the share dialog directly through JavaScript, this has the added advantage of being able to be used on a custom button.
= codeBlender "share-button", "social/facebook/share-button", { href: "http://drykiss.com/" }
<div class='fb-share-button' data-href='http://drykiss.com/' data-layout='icon_link' data-mobile-iframe='true' data-size='small'></div>
= codeBlender "share-button", "social/facebook/share-button", { href: "http://drykiss.com/", layout: "button_count" }
<div class='fb-share-button' data-href='http://drykiss.com/' data-layout='button_count' data-mobile-iframe='true' data-size='small'></div>
= codeBlender "share-button", "social/facebook/share-button", { href: "http://drykiss.com/", type: "javascript" }
<a href="javascript:;" class="facebookShareButton" data-url="http://drykiss.com/"><span class='fa fa-facebook-official fa-fw fa-3x'></span>
</a>
Title | URL |
---|---|
Share button | https://developers.facebook.com/docs/plugins/share-button/ |
Share dialog | https://developers.facebook.com/docs/sharing/reference/share-dialog |
Sharing for webmasters | https://developers.facebook.com/docs/sharing/webmasters |
Sharing best practices | https://developers.facebook.com/docs/sharing/best-practices |
Task | Date |
---|---|
Create the ability to invoke the share dialog without the button : https://developers.facebook.com/docs/sharing/reference/share-dialog | |
Error if a URL is not present - do not default |