I have in my site facebook like plugin, and I try to get the conetnt of facebook iframe by the code:
iframe[0].contentDocument || iframe[0].contentWindow.document;
But in console I get this Error:
Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://like2see.co.il" from accessing a frame with origin "https://www.facebook.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match
I did a search and I get this answer Console displays Uncaught SecurityError So I understand that because my site its not https, there is a solution there but I dont understand him, maybe someone know another solution or can explain me the one that mention there?
https://www.facebook.com
- you can't read content across domains – Pointy