lesca-facebook-share
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

React React React React React NPM React NPM

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

Readme

Keywords

Package Sidebar

Install

npm i lesca-facebook-share

Weekly Downloads

2

Version

1.1.1

License

MIT

Unpacked Size

24.1 kB

Total Files

31

Last publish

Collaborators

  • jameshsu1125