1.0.1 • Published 2 years ago

@hoangnguyen1247/react-facebook-login v1.0.1

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

Table Of Contents

About

react-facebook-login - React hook for Facebook login

Installation

npm install --save @hoangnguyen1247/react-facebook-login

or

yarn add @hoangnguyen1247/react-facebook-login

Getting Started

The simplest way to use react-facebook-login

import useFacebookLogin from "@hoangnguyen1247/react-facebook-login";

function App {

    const { isSdkLoaded, fbLogin } = useFacebookLogin({
        onSuccess: fbCheckLogin,
        appId: process.env.NEXT_PUBLIC_FB_APP_ID,
    });

    return (
        <>
            <Button
                onClick={() => fbLogin()}
            >
                Login
            </Button>
        </>
    )
}

Example

Update soon...

Contributing

I would greatly appreciate any contributions to make this project better. Please make sure to follow the below guidelines before getting your hands dirty.

  1. Fork the repository
  2. Create your branch (git checkout -b my-branch)
  3. Commit any changes to your branch
  4. Push your changes to your remote branch
  5. Open a pull request

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

Copyright © 2022 Hoàng Nguyễn