1.1.1 • Published 7 months ago
lesca-facebook-share v1.1.1
Why use it?
It use for share url to Facebook simply.
Live Demo
Installation
npm install lesca-facebook-share --save
Usage
install before DOM Render
import Facebook from 'lesca-facebook-share';
Facebook.install('facebook-app-id'); // get your id => https://developers.facebook.com/apps/
share with parameters
Facebook.share({
href: 'https://github.com/jameshsu1125/lesca-facebook-share',
quote: 'use share facebook api simply',
hashtag: 'lesca_facebook_share',
redirect_uri: window.location.href,
});
Development
Methods
method | description | return |
---|---|---|
.install(uid: string) | initialize with uid | void |
.share({ href: string, hashtag: string, quote: string, redirect_url: string}) | parmaters |
share parmaters
parmaters | description | default |
---|---|---|
href: string | share url | |
hashtag: string | hashtag | void |
quote: string | quote | void |
redirect_url: string | redirect url (mobile necessary) | location.href |
Features
- maintain if necessary