0

I want to open Facebook page inside iframe but does not render page when I try to just include IFrame with src pointing to Facebook.com. Right now I am opening it inside a window but want to open it inside a frame.

Is there any way to open Facebook page in IFrame?

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
pbhle
  • 2,856
  • 13
  • 33
  • 40
  • Have you read the Facebook docs on how to use FB as your login system? It gives good instructions on how to load the JavaScript SDK to log users into your site with Facebook: https://developers.facebook.com/docs/guides/web/#login – megsa Jul 20 '12 at 06:14
  • Possible duplicate of [Load Facebook into an iframe](https://stackoverflow.com/questions/9680215/load-facebook-into-an-iframe) – Quentin Sep 27 '17 at 10:18

2 Answers2

4

Facebook, as most serious sites explicitly disallow this in order to prevent clickjacking.

One of the ways Facebook do this is by sending the 'X-frame-options:deny' header, which instructs your browser to not display the page inside an iframe.

Sean Kinsey
  • 37,689
  • 7
  • 52
  • 71
0

Are you talking about a facebook page within your own website?

If so;

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

If not could you provide more information.

Update See below comment. It seems Facebook blocks it's pages from being includes in iframes.

AshHimself
  • 4,024
  • 1
  • 21
  • 26
  • 4
    That won't work as Facebook doesn't allow itself to be loaded in iframes. See: http://stackoverflow.com/questions/9680215/load-facebook-into-an-iframe – megsa Jul 20 '12 at 05:14
  • i just want to load facebook login page to do only login not access to the whole facebook site.Can i perform this only.. – pbhle Jul 20 '12 at 06:05
  • No @pallavi, I suggest redirecting them to the site or opening in a popup like you have already done. – AshHimself Jul 20 '12 at 06:09