react-facebook-login
React hook for Facebook login
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.
- Fork the repository
- Create your branch (
git checkout -b my-branch
) - Commit any changes to your branch
- Push your changes to your remote branch
- Open a pull request
License
Distributed under the MIT License. See LICENSE
for more information.
Acknowledgements
Copyright © 2022 Hoàng Nguyễn