react-facebook-login icon indicating copy to clipboard operation
react-facebook-login copied to clipboard

Popup not opening in all browser?

Open siamahnaf opened this issue 2 years ago • 0 comments

Hello, I am using this plugin and react-messenger-chat-plugin` together in my project. Because my project have messenger chat and facebook login features. When I use this two plugin together then in facebook login component onclick do not open any popup. You can check up it here - https://www.nekmart.com/users/login.

Instead of messenger plugin I use messenger script-

<div id="fb-root"></div>
            <div id="fb-customer-chat" className="fb-customerchat"></div>
            <Script id="facebook-messenger1" dangerouslySetInnerHTML={{
              __html: `var chatbox = document.getElementById('fb-customer-chat');
              chatbox.setAttribute("page_id", "app_id");
              chatbox.setAttribute("attribution", "biz_inbox");`
            }} />
            <Script
              id="facebook-messenger"
              dangerouslySetInnerHTML={{
                __html: `
                window.fbAsyncInit = function() {
                  FB.init({
                    xfbml: true,
                    version: 'v15.0'
                  });
        };
  
                (function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) return;
                js = d.createElement(s); js.id = id;
                js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
                fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));
            `,
              }}
            />

I am getting same problem popup not opening. Please suggest me how can I solve this kind of issue.

If there is no way to use this plugin together, Then I have to use useRedirect. If I use useRedirect then how can I find acesssToken and where?

siamahnaf avatar Sep 26 '22 09:09 siamahnaf