使用javascript sdk登录Facebook时出现以下错误
Facebook检测到Review Refer App没有使用安全连接来传输信息的错误。
请参考屏幕截图 http://prntscr.com/p11bi6
答案 0 :(得分:0)
我遇到了同样的问题并尝试了我找到的大多数解决方案,但无济于事。在我的情况下,我意识到这是一个 SSL 问题。 以下步骤为我完全解决了这个问题:
在你的 Package.json >
"start": "set HTTPS=true&&set SSL_CRT_FILE=cert.pem&&set SSL_KEY_FILE=key.pem&&set REACT_APP_ENV=dev&& react-scripts start"
创建 SSL 证书
1. Define SSL Config.
Save the following as req.conf:
[req]
distinguished_name = Companyname
x509_extensions = v3_req
prompt = no
[Companyname]
C = US
ST = VA
L = SomeCity
O = Companyname
OU = MyDivision
CN = www.Companyname.com
[v3_req]
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
DNS.2 = other
2. Run CMD
openssl req -x509 -nodes -days 730 -newkey rsa:2048 -keyout key.pem -out cert.pem -config req.conf -extensions 'v3_req'
3. Import certificate into Trusted certificate store
3.1 Convert to pfx with following CMD
openssl pkcs12 -inkey key.pem -in cert.pem -export -out cert.pfx
3.2 Run certmgr and import the pfx certificate into personal and Trusted Root certificate stores
这对我有用,我希望它有帮助。