Facebook and SSL partially encrypted

2019-06-11 19:49发布

问题:

I got problem when loading Facebook Javascript SDK, it will causing my SSL connection partially encrypted. I try load not using the asychronous one but the result same. Do you have solution for this problem guys?

Thanks @andriansandi

回答1:

the code facebook gives to implement the JS SDK uses a protocol relative URL ... The URL of the JS file is //connect.facebook.net/en_US/all.js.
By not specifying http/https the browser will automatically use whichever protocol the page was requested with.
Try substituting that with https://connect.facebook.net/en_US/all.js. This will force facebook to load the SDK over https.



标签: facebook ssl