I need to create a custom Facebook Page Tab app which will show an external site in an iframe. This need to have adverts on it but I'm not sure if this is possible as the site is hosted externally.
I'm not sure if I need to sign up to the Facebook Audience Network to get approved etc. either?
Any help or advice would be great.
Many browsers have this limitation of not allowing external sites to be shown in an
iframe
. Imagine the case when you are working hard to create a site and others show all your content iniframes
. That is, naturally frustrating.However, there is a candidate-solution: Let's suppose you create a page which sends a request to the other site and appends all the content into the body and head of your page. This is very much possible, so the solution is to:
outsider
outsider
page send a request to the desired page to be shownhtml
of the page. Process it and include its content into thehead
andbody
ofoutsider
. This includes: 3.1. Checking all the CSS to be reached, as the target page might refer to local CSS, which is unreachable locally at your end. Process the URLs of CSS files 3.2. Checking all the Javascript to be reached, as the target page might refer to local JS, which is unreachable locally at your end. Process the URLs of JS files 3.3. Apply the idea described in 3.1. and 3.2. for other resources, like images, until you are satisfied with the content of outsideriframe
, having the source to point tooutsider
.outsider
is inside your scope, so it should be shownNOTE: If the site owning the target page does not like the possibility of you showing their content inside
iframes
, they might protect it by, let's say, having Javascript in their code, which checks whether the page is inside aniframe
. Remove that code while processing the response to your request. If nothing else prevents you from showing the page in aniframe
, then you should achieve success.