I have a little bit of a problem with the Facebook SDK. I have a web site, http://incampus.ro, and it is working with iframes mostly (is in early development stage). If I want to call a Facebook authentication into the iframe, I get a Facebook logo and after I click it I'm redirected to a Facebook authentication page, in full screen format. I don't really want that. How do I fix this problem?
I forgot to mention: If I call the URL from an iframe into a new tab everything is work开发者_运维百科ing OK.
Facebook
doesn't allow you to load it in an IFrame to prevent ClickJacking attacks.
Facebook prevents you from linking directly to the actual site via an iframe (or any frame). This is because any site putting Facebook in an iframe (or any frame) could use JavaScript to access elements of the Facebook page, including the username and password fields.
There is no way around this. It is built in to the browsers themselves to send some information along in the request header that says it is being requested to be put in frame.
Gmail and several other sites do this as well.
Basically. You can not frame Facebook.
精彩评论