4

Facebook.com is not running in I frame anyone now the reason.

<iframe name="iframe1" src="http://www.facebook.com"></iframe>
Epdr
  • 41
  • 1
  • 1
  • 3

1 Answers1

9

Facebook.com doesn't allow for it's main page to be included in iframe, because they set X-Frame-Options HTTP header to DENY.

If you look in your console, you'll see:

Refused to display 'https://www.facebook.com/' in a frame because it set 'X-Frame-Options' to 'DENY'.

If you want to get around this you can:

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

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

Daniel Kmak
  • 18,164
  • 7
  • 66
  • 89
  • same problem was happening with google but it resolved when i tried is there any same solution for facebook ? – Epdr Jun 20 '15 at 07:57
  • I don't think so. Facebook blocks including itself in ` – Daniel Kmak Jun 20 '15 at 08:00