{"library":"react-facebook-auth","title":"React Facebook Authentication Component","description":"The `react-facebook-auth` package provides a React component designed for client-side Facebook authentication, enabling developers to obtain an authentication token for subsequent backend validation. The current stable version, 1.4.0, was released several years ago. The project appears to be unmaintained, with its last update occurring over six years ago, and its peer dependencies (`react` `^15.0.0 || ^16.0.0`) are significantly outdated. This component primarily functions as a wrapper around the Facebook SDK for JavaScript, handling its initialization and the callback mechanisms for successful authentication or failures. While it offered a straightforward way to integrate Facebook login into React applications at the time of its release, its age renders it largely unsuitable for modern React development environments or current Facebook Graph API versions. Its lack of maintenance also poses significant security and compatibility risks.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install react-facebook-auth"],"cli":null},"imports":["import FacebookAuth from 'react-facebook-auth';","const FacebookAuth = require('react-facebook-auth');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import React from 'react';\nimport ReactDOM from 'react-dom';\nimport FacebookAuth from 'react-facebook-auth';\n\nconst MyFacebookButton = ({ onClick }) => (\n  <button onClick={onClick}>\n    Login with facebook\n  </button>\n);\n\nconst authenticate = (response) => {\n  console.log('Facebook Auth Response:', response);\n  // In a real application, you would send this token to your backend\n  // for validation and user session management.\n  // Example: fetch('/api/auth/facebook', { method: 'POST', body: JSON.stringify(response) });\n};\n\nconst App = () => (\n  <div>\n    <h1>Facebook Auth Example</h1>\n    <p>This component provides a customizable button that triggers the Facebook login flow.</p>\n    <FacebookAuth\n      appId={process.env.REACT_APP_FACEBOOK_APP_ID ?? 'YOUR_FACEBOOK_APP_ID'}\n      callback={authenticate}\n      component={MyFacebookButton}\n      scope=\"public_profile,email\"\n      fields=\"name,email,picture\"\n    />\n    <p>Make sure to replace 'YOUR_FACEBOOK_APP_ID' with your actual Facebook App ID.</p>\n    <p>This package is deprecated and likely incompatible with modern Facebook API versions and React.</p>\n  </div>\n);\n\nReactDOM.render(\n  <App />,\n  document.getElementById('root'),\n);","lang":"javascript","description":"This quickstart demonstrates how to integrate the `FacebookAuth` component, provide a custom button for the login trigger, and handle the authentication response, including placeholder for backend integration. It highlights the use of `appId`, `callback`, and `component` props.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}