react-fb-signin
v0.0.3
Published
Login with Facebook component
Downloads
1
Readme
react-fb-signin
Login with Facebook (React Component)
Installation
npm install react-fb-signin
Usage
import React from 'react';
import FBLogin from 'react-fb-signin';
class App extends React.Component {
fbLoginSuccess = (props) => {
console.log('success', props)
}
fbLoginFailure = (props) => {
console.log('error', props)
}
render(){
return (
<FBLogin
appId="<your_app_id>"
fields="email,name,birthday"
successCallback={this.fbLoginSuccess}
failureCallback={this.fbLoginFailure}
>
Login with Facebook
</FBLogin>
)
}
}
export default App;
Note:* 1. Don't forget to replace "<your_app_id>" with your facebook app id. 2. Add in fields parameter whichever permission you want from the users.