0.4.0 • Published 5 years ago
facebook-button v0.4.0
facebook-button

Facebook button as Web Components.
Install
Using npm:
$ npm install facebook-buttonUsage
Import and register scripts.
<script type="module">
import { FacebookLikeButton, FacebookShareButton } from 'https://unpkg.com/facebook-button';
customElements.define('facebook-like-button', FacebookLikeButton);
customElements.define('facebook-share-button', FacebookShareButton);
</script>Just put <facebook-like-button> and <facebook-share-button> element in your HTML.
<facebook-like-button></facebook-like-button>
<facebook-share-button></facebook-share-button>FacebooLikeButton
href: required string, URL to like or sharelayout: string, must be eitherbutton_count,buttonorbox_count, default tobuttonsize: string, must be eithersmallorlarge, default tosmallwidth: number, width of<facebook-like-button>action: string,likeorrecommend, default tolike
FacebookShareButton
href: required string, URL to like or sharelayout: string, must be eitherbutton_count,buttonorbox_count, default tobuttonsize: string, must be eithersmallorlarge, default tosmallwidth: number, width of<facebook-share-button>