javascript - Accessing facebook through iframe tag and getting a cross origin error -
i'm testing in local host , getting cross origin error.. how resolve problem me i'm beginner , don't have knowledge that
<script type="text/javascript"> function iframeloaded() { var iframeid = document.getelementbyid('idiframe'); if (iframeid) { iframeid.height = ""; iframeid.height =iframeid.contentwindow.document.body.scrollheight + "px"; </script> <iframe onload="iframeloaded()" src="http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/palletech" frameborder="1"..../>
you can't. design, access content served other origins (domains, etc.) protected same origin policy. access page on origin, other site have explicitly give access, facebook not do.
Comments
Post a Comment