安全加载Facebook个人资料图片

问题描述:

我正在尝试将来自Facebook的用户个人资料图片包含在内,这样可以正常工作,但事情就是当您想要将其包含在受SSL保护的页面上时。我找不到从安全位置加载图片的方法。使用以下链接到用户个人资料照片:

I'm trying to include users profile picture from facebook, which works fine, but the thing is when you want to include it on a SSL-secured page. I can't find a way to get the picture to load from a secure location. Using the following link to the users profile pic:

https://graph.facebook.com/<FB_ID HERE>/picture?type=square

即使我使用 https ,它也不会安全加载(浏览器说页面只是部分加密)。这并不奇怪,因为链接只是重定向到图像,例如我的个人资料图片:

Even though I use https it doesn't get loaded securely (browser says the page is just partially encrypted). And this isn't strange since the link just redirects to the images, for example for my profile picture:

https://graph.facebook.com/Bazze/picture?type=square

这将得到以下图片: / p>

This will get the picture from:

http://profile.ak.fbcdn.net/hprofile-ak-snc4/161513_633115680_6792455_q.jpg

请注意,这不是一个安全的位置。

Note that that is not a secure location.

任何人都知道如何通过 https 协议安全加载个人资料图片?

Anyone know how to load the profile picture securely through the https protocol?

谢谢!


  1. 这是一个安全的位置,它不是一个安全的重定向

  2. 你能做的就是确保你正在使用在调用图形api之后的安全请求,之后Facebook将接管通信并且没有可以完成。

  1. It IS a secure location, it's just not a secure redirect
  2. All you can do is making sure you are using secure request when calling the graph api, after that Facebook will take over the communication and nothing can be done.