Facebook 登录黑屏正在制作中

问题描述 投票:0回答:2

我正在使用 react-facebook-login 库在我的 React 应用程序中实现 facebook 登录。每次我点击 Facebook 登录按钮尝试登录时,由于某种原因,它都会给我一个空白页面。一旦我关闭弹出窗口,它就会自动登录到我的帐户。这仅发生在生产中,本地主机上一切正常。我检查了下面的网址,看看应用程序 ID 是否有问题,但没有。

这是弹出页面的屏幕截图:

这是网址:

https://www.facebook.com/v2.3/dialog/oauth?app_id=[app_id]&auth_type=&cbt=1662983366825&channel_url=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F %3Fversion%3D46%23cb%3Df3167cf29f7288c%26domain%3Ddash.indepth.inkylab.com%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Fdash.indepth.inkylab.com%252Ff304eb27eb1ffa4%26relation%3Dopener& client_id=[client_id]&显示= popup&domain=dash.indepth.inkylab.com&e2e=%7B%7D&fallback_redirect_uri=https%3A%2F%2Fdash.indepth.inkylab.com%2Fdashboard%2Foverview%2F&locale=en_US&logger_id=f1c467f11696cbc&origin=1&redirect_uri=https%3A%2F%2Fstaticxx.facebook .com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df11d4365f6ca06%26domain%3Ddash.indepth.inkylab.com%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Fdash.indepth.inkylab.com%252Ff3 04eb27eb1ffa4 %26relation%3Dopener%26frame%3Df36d6c5766d6e5&response_type=token%2Csigned_request%2Cgraph_domain&return_scopes=false&scope=public_profile%2Cpages_show_list%2Cread_insights%2Cpages_read_engagement%2Cpages_read_user_content&sdk=joey&version=v2.3

组件:

                <FacebookLogin
                    appId={appId}
                    autoLoad={false}
                    scope={permissions.join(',')}
                    fields="name,email,picture"
                    onClick={handleClick}
                    callback={handleResponse}
                    render={renderProps => (
                        <div className="fb-login" onClick={renderProps.onClick}>
                            <img className="fb-login-logo" src="https://static.xx.fbcdn.net/rsrc.php/v3/yd/r/pXqmY8Ggh_m.png" />
                            <span className="fb-inner">&nbsp;&nbsp;Login with Facebook</span>
                        </div>
                    )}
                />
reactjs facebook facebook-login
2个回答
8
投票

显然您需要使用 javascript sdk 启用登录并指定允许的域。这对我来说就是问题。设置可以在facebook登录产品设置中找到。


0
投票

我的应用程序创建了一段时间,当我尝试将其设置为 Facebook Login for Business 时,我遇到了这个黑屏问题,即使一切似乎都已设置。经过 2 天的努力,解决方案是在我的帐户中创建另一个新应用程序,并且它可以使用相同的设置。 也许会有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.