0.0.14 • Published 7 years ago
hybrid-react-facebook-login-component v0.0.14
hybrid-react-facebook-login-component
This plugin wraps React components with react-facebook-login-component.
If you are from within a native application running on JS, you will be authenticated using InAppBrowswer and authentication from web site will use react-facebook-login-component.
When authenticating with InAppBrowswer, the following settings are required on the facebook developer screen.
A valid OAuth redirect URI
https://www.facebook.com/connect/login_success.html
Install
npm i -D hybrid-react-facebook-login-component
Usage
import React from 'react';
import ReactDOM from 'react-dom';
import HybridFacebookLogin from 'hybrid-react-facebook-login-component';
ReactDOM.render(
<HybridFacebookLogin
facebookClientId="facebookClientId"
facebookSecret="facebookSecret"
language="en_US"
scope="public_profile,email"
handleResponse={(accecc_token) => {
// login process
}}
xfbml={true}
version="v2.5"
class="button button--large button--facebook button-text--small"
buttonText="Facebook login"
/>,
document.getElementById('content')
);
License
MIT