react-facebook-sociallogin-auth

0.3.0 • Public • Published

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}
/>

Package Sidebar

Install

npm i react-facebook-sociallogin-auth

Weekly Downloads

4

Version

0.3.0

License

none

Unpacked Size

5.74 kB

Total Files

4

Last publish

Collaborators

  • sristi_mondal