views:

52

answers:

1

On an e-commerce website I maintain, I added a Facebook 'Like' button per the instructions here:

http://developers.facebook.com/docs/reference/plugins/like

I am using the iframe method:

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Fpage%2Fto%2Flike&amp;amp;layout=standard&amp;amp;show_faces=true&amp;amp;width=450&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>

It works, but if a customer happens to be logged into her account, she gets the infamous "mixed content warning"

Is there a way to use the same Facebook 'Like' button code but in a way that will not interject non-https content when in SSL mode?

+3  A: 

Here is a hint, facebook supports SSL ;)

Byron Whitlock
Byron Whitlock
Do you mean replace all occurrences of 'http' in the above <iframe> with 'https'? If so, could there be any side effects? For example, "mixed content" when a customer is NOT logged in? Or... will this slow down search engine bots crawling? (there are hundreds of pages with this button on the aforementioned website, if the answer is 'yes', this could result in significant problem for SEO).
Android Eve
Yes, replace http, with https. Facebook will not serve any "mixed" content when you use ssl, so it should work fine. Search engines will not load iframe content. You aren't the first to have this problem which is why they serve both http and https.
Byron Whitlock