javascript - why facebook is not working in Iframe -


facebook.com not running in frame reason.

<iframe name="iframe1" src="http://www.facebook.com"></iframe> 

facebook.com doesn't allow it's main page included in iframe, because set x-frame-options http header deny.

if in console, you'll see:

refused display 'https://www.facebook.com/' in frame because set 'x-frame-options' 'deny'.

if want around can:

  1. if develop yourself, can use browser plugin, example: https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe

  2. however, it'd best if you'll use plugins they've exposed developers: https://developers.facebook.com/docs/plugins.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -