Skip to content

Commit

Permalink
value default scope
Browse files Browse the repository at this point in the history
  • Loading branch information
keppelen committed Apr 26, 2015
1 parent 2ff2e71 commit a48e039
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions facebook.jsx
Expand Up @@ -8,8 +8,8 @@ module.exports = React.createClass({
return (
<div>
<button
className={this.props.class}
onClick={this.handleClick}>
className={ this.props.class ? this.props.class : 'facebook-login'}
onClick={ this.handleClick }>
{ this.props.callToAction ? this.props.callToAction : "Login with Facebook"}
</button>
<div id="fb-root"></div>
Expand Down Expand Up @@ -77,8 +77,8 @@ module.exports = React.createClass({
},

handleClick: function() {
var scope = {scope: this.props.scope };
var valueScope = this.props.scope || 'public_profile, email, user_birthday';

FB.login(this.checkLoginState, scope);
FB.login(this.checkLoginState, { scope: valueScope });
}
});

0 comments on commit a48e039

Please sign in to comment.