0.1.7 • Published 2 months ago

@healerlab/vue3-facebook-login v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Vue 3 facebook login

npm npm GitHub

Demo

Demo and docs

Installation

Prerequisites

To get started, you can install vue3-facebook-login with:

npm i @healerlab/vue3-facebook-login

with pnpm:

pnpm add @healerlab/vue3-facebook-login

with yarn:

yarn add @healerlab/vue3-facebook-login

Usage

See the FaceBook Graph API for more information about scope.

Import the component and register it locally in your Vue component:

<script setup>
import { HFaceBookLogin } from '@healerlab/vue3-facebook-login';

const onSuccess = (response) => {
  // get your auth token and info
}

const onFailure = () => {
  // logic if auth failed
}
</script>

Use the component in your template:

<HFaceBookLogin 
  v-slot="fbLogin" 
  app-id="391069538168549" 
  @onSuccess="onSuccess" 
  @onFailure="onFailure"
  scope="email,public_profile"
  fields="id,name,email,first_name,last_name,birthday"
>
  <span @click="fbLogin.initFBLogin" class="fb-button">Login with facebook</span>
</HFaceBookLogin>

This is style for this example and not required, you can change and customize it to match your use-case:

.fb-button {
  display: inline-block;
  margin: 10px 0 10 0;
  color: white;
  background-color: #1967d2;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
}

See the Vue3 FaceBook Login page for more information.

0.1.7

2 months ago

0.1.6

4 months ago

0.1.5

4 months ago

0.1.4

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago

0.0.9

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago