0.3.0 • Published 2 years ago

react-facebook-sociallogin-auth v0.3.0

Weekly downloads
-
License
-
Repository
bitbucket
Last release
2 years ago

Facebook Authentication in React

Introduction

This is a react specific library for facebook authentication/login/signin.

Library link : https://www.npmjs.com/package/react-facebook-sociallogin-auth

Install

Install dependencies

npm i react-facebook-sociallogin-auth

How to Use

In your component import

 import FacebookAuthLogin from 'react-facebook-sociallogin-auth';

Add component

const responseFacebook = (response) => {
    console.log("logged in", response);         // For Login success this function will invoked
  };

const onLoginFailure = (res) => {
    console.log("Login Failed:", res);          // For Login success this function will invoked
  };

<FacebookAuthLogin
    appId={appId}      //facebook auth appId
    backgroundColor={"#4267B2"}
    textColor= {"#fff"}
    border = {"none"}
    height = {"40px"}
    width = {"250px"}
    fontSize = {"15px"}
    logoColor = {"#fff"}
    logoSize = {30}
    textLogin = {"Continue with Facebook"}
    responseFacebook = {responseFacebook}
    onLoginFailure={onLoginFailure}
/>