https://github.com/andrelmlins/svelte-facebook-login
Facebook Login Component to Svelte
https://github.com/andrelmlins/svelte-facebook-login
facebook library login svelte
Last synced: 3 months ago
JSON representation
Facebook Login Component to Svelte
- Host: GitHub
- URL: https://github.com/andrelmlins/svelte-facebook-login
- Owner: andrelmlins
- License: mit
- Created: 2020-01-24T00:44:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T14:13:18.000Z (over 2 years ago)
- Last Synced: 2024-12-22T19:05:50.586Z (7 months ago)
- Topics: facebook, library, login, svelte
- Language: Svelte
- Homepage: https://svelte-facebook-login.netlify.com/
- Size: 625 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-svelte - Svelte Facebook Login - Realiza login com o facebook. (UI Componentes / Comunidade Global)
README
# Svelte Facebook Login
[](https://www.npmjs.com/package/svelte-facebook-login) • [](https://github.com/andrelmlins/svelte-facebook-login/blob/master/LICENSE) • [](https://travis-ci.com/andrelmlins/svelte-facebook-login) • [](https://app.netlify.com/sites/svelte-github-login/deploys) • [](https://lgtm.com/projects/g/andrelmlins/svelte-facebook-login/context: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](https://github.com/sveltejs/sapper-template#using-external-components).
## Demo [Link](https://svelte-facebook-login.netlify.com/)
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:
```js
import FacebookLogin from "svelte-facebook-login";
console.log(params)}
on:error={error => console.log(error)}
let:onLogin
>
Facebook Login```
## Properties
Component props:
| Prop | Type | Description |
| ------------ | ------ | --------------------------------------------------------------------------- |
| clientId | string | Client ID for Facebook OAuth application |
| state | string | Value created by the maintenance state between the request and the callback |
| redirectUri | string | Registered redirect URI for Facebook OAuth application |
| responseType | string | Grant type the application wants to use |
| scope | string | A space-delimited list of permissions that the application requires |
| pollInterval | number | Login success analysis interval |## Events
| Prop | Type | Description |
| ------- | ---- | ----------------- |
| success | func | Call with success |
| error | func | Call with error |
| request | func | Call with offset |## Slot Properties
| Prop | Type | Description |
| ------- | ---- | -------------- |
| onLogin | func | Call for login |## NPM Statistics
Download stats for this NPM package
[](https://nodei.co/npm/svelte-facebook-login/)
## License
Svelte Facebook Login is open source software [licensed as MIT](https://github.com/andrelmlins/svelte-facebook-login/blob/master/LICENSE).