We’re serving a Facebook feed in our site, which includes images such as profile pictures that are served off Facebook’s cdn. Our site is served over HTTPS, and we generally use protocol-relative urls when linking to outside images. However, the facebook images were not showing up. After digging, i noticed that https links pointing to facebook cdn images throw an SSL error because the Facebook CDN url doesn’t match the Akamai URL associated with their certificates.
Compare:
http://profile.ak.fbcdn.net/hprofile-ak-prn1/50164_1132339922_583434524_n.jpg
https://profile.ak.fbcdn.net/hprofile-ak-prn1/50164_1132339922_583434524_n.jpg
This makes using HTTPS or protocol-relative urls for facebook images impossible to access as image sources, and so makes embedding Facebook images into HTTPS sites impossible without triggering mixed content warnings.
Has anyone run into this?
Figured this out:
On your graph api calls, use
return_ssl_resources=1, and it will give you the proper image https urls