keppelen / react-facebook-login

A Component React for Facebook Login
1.18k stars 406 forks source link

Your thing doesn't call FB.init() ever. #243

Closed DogAndHerDude closed 5 years ago

DogAndHerDude commented 5 years ago

I have to do it manually to make it work.

The script is loaded only once, the configuration is:

          <FBAuth
            appId="<app-id>"
            size="small"
            autoLoad={false}
            xfbml={true}
            fields="name,email,picture"
            icon="fa-facebook"
            callback={this.props.handleFacebookLogin}
          />

regardless if I set autoLoad to true or not, it does the same thing. Which is nothing.

So the grand error is: FB.login() called before FB.init()

sgobotta commented 5 years ago

What do you mean by manually? It works for me using autoLoad={true}

joeythelantern commented 5 years ago

Also getting rekt by this problem :(

joeythelantern commented 5 years ago

autoLoad={true} doesn't stop it

angelxmoreno commented 5 years ago

I was having the same issue. I confirmed my app_id was indeed NOT being set as per https://github.com/keppelen/react-facebook-login/issues/71#issuecomment-408006509

I fixed it so the the app_id is actually being set and now all is good.

ajsharp commented 5 years ago

I'm getting this too. This library should raise an error is appId is either null or an empty string.