React Facebook Login HOC
What is ?
Easily for you to append facebook root dom and dependencies file
How to use ?
npm install react-facebook-login-hoc
Exposed API
- this.props.fb.status(cb :function)
- this.props.fb.login(cb :function [,scope :object])
- this.props.fb.logout()
Configuration
const configureLoginProps = scope: 'public_profile, email' xfbml: false cookie: false version: 26 language: 'en_US' appId: 'Your APP ID'
Quick start
const configureLoginProps = scope: 'public_profile' xfbml: false cookie: false version: 26 language: 'en_US' appId: '488387194689361' { superprops thisstatus = thispropsfbstatus thislogin = thispropsfblogin thislogout = thispropsfblogout } { if responseauthResponse thisresponseApi } { console } { thisstatusthisgetStatus }; { this } { this } { return <div> <button onClick= thischeckLoginState >Get Facebook Login Status</button> <button onClick= thisloginFacebook >Facebook Login</button> <button onClick= thislogoutFacebook >Facebook Logout</button> ; } configureLoginPropsApp;
License
MIT