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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -