1.3.0 • Published 3 years ago

svelte-facebook-login v1.3.0

Weekly downloads
98
License
MIT
Repository
github
Last release
3 years ago

Svelte Facebook Login

npm version License: MIT Build Status Netlify Status Language grade: JavaScript

Facebook Login Component to Svelte

Installation

npm i svelte-facebook-login
// OR
yarn add svelte-facebook-login

version with typescript

npm i svelte-facebook-login@next
// OR
yarn add svelte-facebook-login@next

Note: to use this library in sapper, install as devDependency. See the link.

Demo Link

Local demo:

git clone https://github.com/andrelmlins/svelte-facebook-login.git
cd svelte-facebook-login
npm install && npm run dev

Examples

An example of how to use the library:

<script>
  import FacebookLogin from "svelte-facebook-login";
</script>

<FacebookLogin
  clientId="XXX"
  state="1"
  redirectUri="http://localhost:5000/"
  on:success={params => console.log(params)}
  on:error={error => console.log(error)}
  let:onLogin
>
  <button on:click={onLogin}>Facebook Login</button>
</FacebookLogin>

Properties

Component props:

PropTypeDescription
clientIdstringClient ID for Facebook OAuth application
statestringValue created by the maintenance state between the request and the callback
redirectUristringRegistered redirect URI for Facebook OAuth application
responseTypestringGrant type the application wants to use
scopestringA space-delimited list of permissions that the application requires
pollIntervalnumberLogin success analysis interval

Events

PropTypeDescription
successfuncCall with success
errorfuncCall with error
requestfuncCall with offset

Slot Properties

PropTypeDescription
onLoginfuncCall for login

NPM Statistics

Download stats for this NPM package

NPM

License

Svelte Facebook Login is open source software licensed as MIT.

1.3.0

3 years ago

2.0.0-rc2

3 years ago

2.0.0-rc1

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago