Php Facebook登录JAvascript SDK,内容安全策略

Php Facebook登录JAvascript SDK,内容安全策略,php,facebook-javascript-sdk,facebook-login,content-security-policy,Php,Facebook Javascript Sdk,Facebook Login,Content Security Policy,我已经在我的网站上实现了使用facebook登录(使用javascript SDK方法),如果我禁用我的CSP(内容安全策略),它会很好地工作,但如果我启用它,它将不会工作,下面是我的CSP代码,有人能告诉我,我错过了什么 default-src 'none'; connect-src 'self'; frame-src https://www.facebook.com https://staticxx.facebook.com http://staticxx.facebook.com; img

我已经在我的网站上实现了使用facebook登录(使用javascript SDK方法),如果我禁用我的CSP(内容安全策略),它会很好地工作,但如果我启用它,它将不会工作,下面是我的CSP代码,有人能告诉我,我错过了什么

default-src 'none';
connect-src 'self';
frame-src https://www.facebook.com https://staticxx.facebook.com http://staticxx.facebook.com;
img-src 'self' https://*.facebook.com https://scontent.xx.fbcdn.net;
script-src 'self' https://code.jquery.com https://connect.facebook.net https://graph.facebook.com;

PS:我一直在搜索“facebook登录CSP”,但没有运气,请帮助。

您在控制台中得到了什么确切的CSP错误?在我的CSP报告中没有错误,但如果我启用CSP,facebook api将返回此错误;{“error”:{“code”:1,“error_subcode”:1357045,“message”:“unknown error(empty response)”,“type”:“http”,“status”:0}}这是调用FB.api时返回的('/me?fields=name,gender,email',function(response){alert(JSON.stringify(response));});您好,Stephen R感谢您的见解,我查看了mozilla开发者工具,tabs控制台,其中有CSP警告,graph.facebook.com在connect src中被阻塞,因此当我添加新策略时,它是有效的。非常感谢你!!