Reputation: 89
I want to embed iframe section on account tab. I've created simple Visualforce page with Standart Controller - Account.
<apex:page standardController="Account">
<h1>Congratulations</h1>
This is your new Page
<div>
<apex:iframe src="https://www.facebook.com/" width="800" height="600" />
</div>
</apex:page>
I've added a VisualForce section into account layout. But I'm unable to see my iframe content in the result details page. It seems that iframe content is rendered only if my iframe is related to salesforce domain.
So my question is: Is it possible to embed external domain page into standard details page?
Upvotes: 0
Views: 7746
Reputation: 1984
Facebook does not like people framing its content. I believe that is the problem rather than it being salesforce related. To be sure, try swapping the facebook url for this:
If that works, then you know it's not salesforce blocking you but facebook.
(Club Penguin is just a site I know that happens to allow iframes, so it's a good one to test with!)
When you try and frame facebook you will probably find this error if you look in a browser debugger:
Refused to display document because display forbidden by X-Frame-Options.
There is a discussion of this error here:
Overcoming "Display forbidden by X-Frame-Options"
Upvotes: 2