问题
On my Drupal 7 Website when users login with Facebook it pulls an insecure image
http:// profile.ak.fbcdn.net/hprofile-ak-ash3/211260_100002498550684_1807914074_s.jpg
I am using Drupal For Facebook
I've followed instructions here
Facebook JavaScript SDK over HTTPS loading non-secure items
Maybe it is outdated, what is the current fix for this?
Also oddly, When I login with my Facebook account it does not have the problem
https:// fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/211648_100004825298386_474362609_s.jpg
How do I make the profile pics secure no matter what? Thank your for your time.
回答1:
You can easily have the Graph API return the SSL URL for a user picture by appending the parameter return_ssl_resources=1
– see Mark’s picture, requested in the secure version:
https://graph.facebook.com/4/picture?return_ssl_resources=1
回答2:
So upon further review I came to realize that my Facebook profile was the only one having problems on my website with my profile picture staying unsecured after logging in with Facebook.
Upon digging deeper I realized when I logged into www.facebook.com directly my connection was by default unsecured as well.
I went into Account Setting and the Security tab and it said something about Secure browsing being in migration. I changed Secure Browsing to enabled and voila!
Everything is working perfectly.
I'm still wanting to implement this
str_replace('http://profile.ak.fbcdn.net','https://fbcdn-profile-a.akamaihd.net',$user['pic_square']);
So just in case someone it stuck in old school unsecured browsing it replaces the link but I don't even know how to do this or where the code goes but I will save that for another day.
来源:https://stackoverflow.com/questions/15423476/facebook-profile-pic-coming-up-as-http-on-secure-website-expected-https