且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法从Chrome扩展程序加载facebook js sdk

更新时间:2023-12-05 18:50:52

这是因为您正在尝试从Chrome扩展程序加载外部脚本。为了安全起见,为了防止跨站点脚本,您需要在 manifest.json 文件中获得特殊许可。

This is because you are trying to load an external script from your Chrome extension. For security reasons to prevent cross-site-scripting you need a special permission in your manifest.json file.

"content_security_policy": "script-src 'self' https://connect.facebook.net; object-src 'self'"

确保使用https://而不是http://。

Make sure you use https:// instead of http://.