0

I have created a Facebook Business web app in a react project and want to add config_id while logging in. As the documentation mentioned for the business web app, https://developers.facebook.com/docs/facebook-login/facebook-login-for-business, we can add config_id in FB.login() and on a click of HTML button, we can do the login.

But I don't want use the HTML button and want to use Facebook Login Button which is documented here. https://developers.facebook.com/docs/facebook-login/web/login-button, I am using following thing to add the Facebook button,

<div 
  className="fb-login-button"
  data-max-rows="1"
  data-size="large"
  data-button-type="login_with"
  data-layout=""
  data-use-continue-as="true"
></div>

But I could not find a way to add config_id here and I am kind of stuck here for using Facebook login button for Facebook business app. Is there a way to add the config_id here?

1 Answer 1

0

You can add config_id just like the other properties using data. Like below;

   <div
            className="fb-login-button"
            data-width=""
            data-size="medium"
            data-button-type="continue_with"
            data-layout="default"
            data-auto-logout-link="false"
            data-use-continue-as="true"
            data-onlogin={() => facebookLogin}
            data-config_id={process.env.NEXT_PUBLIC_FACEBOOK_LOGIN_CONFIG_ID}
          ></div>

Not the answer you're looking for? Browse other questions tagged or ask your own question.