This is my first time using Facebook authentication for my application. I can make it work fine through the tutorial, I can log in to the userβs system and log out of the system using the convenient Facebook login button, as shown in the example in the Facebook SDK docs:
https://developers.facebook.com/docs/facebook-login/web
I like to use this button because it is easy, automatically subscribes to the Facebook branding requirements and automatically becomes the Facebook exit button when a user logs in. Absolutely in every way. Here is what the button code with the automatic exit looks like:
<fb:login-button data-auto-logout-link="true" scope="public_profile" onlogin="checkLoginState();">
</fb:login-button>
It looks like sauce until I try it on the ReactJS page.
<script type='text/babel'>
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
Hello, world! I am a CommentBox.<br />
// MY ADDITION ... it breaks
<fb:login-button data-auto-logout-link="true" scope="public_profile,email" onlogin="checkLoginState();">
</fb:login-button>
</div>
);
}
});
ReactDOM.render(
<CommentBox />,
document.getElementById('content')
);
</script>
I also tried this as follows:
ReactDOM.render(
<fb:login-button data-auto-logout-link="true" scope="public_profile,email" onlogin="checkLoginState();"></fb:login-button>,
document.getElementById('loginbutton')
);
FB SDK , : "JSX - XML". .
React, FB? , , Facebook React, , . ( - , , / .)