Does DFP serve in an iFrame (which hosts my site) on another Site? - google-dfp

Let's say I host a website: http://www.example.com
And I load ads on my website using DFP. And everything works out perfectly.
Now lets assume another site: http://www.anothersite.com is loading our site in an iframe.
My question is, does DFP load in that iframe ? Does it depend on DFP settings such as 'Serve in Safeframe' option?
Thanks

Yes it will, DFP doesn't know anything about the outer iframe.
Safeframe controls how the inner frame in which your ads are shown is rendered and it has nothing to do with any outer frames.
SafeFrame is a cross-domain iframe that enables transparent and rich
interactions between page content and ads, while preventing ads from
accessing publisher data

Related

Contentful images not showing in Facebook in-app browser

Images loaded via <img> or background-image CSS URL from Contentful CMS don't show in Facebook's in-app browser e.g:
"//images.ctfassets.net/yadj1kx9rmg0/wtrHxeu3zEoEce2MokCSi/cf6f68efdcf625fdc060607df0f3baef/quwowooybuqbl6ntboz3.jpg"
...with Https hosting, and load in all other modern browsers, but not FB in app browser
I'm thinking it's a mixed content problem, but don't see how?
You just need to programatically add https: to the beginning of the image URL. It is called a protocol relative URL and it'll work with most websites by automatically taking the protocol of the page that contains it but I guess it doesn't work for Facebook

Why Facebook Pixel doesn't track URLs when embedded in iframe?

I've noticed that when FB pixel is embedded into a standard web page, it works correctly.
This is the call it does:
https://www.facebook.com/tr/?id=PIXEL_ID&ev=PageView&
dl=https%3A%2F%2Fautotarget.co%2Fauto%2Faudi%2Fa6%2Fpr%2Femilia-romagna%2F-8-%2F48%2F&rl=&if=false&ts=1464110706891&v=2.5.0&pv=visible
And i see the url on the Audicence panel on Business Manager.
The problem is when the FB pixel is embedded on iframes. It seems it doesn't track the iframe URL.
This is the call it does:
https://www.facebook.com/tr/?id=PIXEL_ID&ev=PageView&
dl=https%3A%2F%2Fautotarget.co%2Fauto%2Faudi%2Fa6%2Fpr%2Femilia-romagna%2F-8-%2F48%2Fthankyou-call%2F&
rl=https%3A%2F%2Fautotarget.co%2Fauto%2Faudi%2Fa6%2Fpr%2Femilia-romagna%2F-8-%2F48%2F&
if=true&ts=1464107424477&v=2.5.0&pv=visible
In this case dl parameter is the right URL, rl parameter is the URL of the page embedding the iframe.
Could you please help us?

Facebook App Redirect Top Level Frame

Is it possible to redirect the top level page from within the iframe of a facebook app?
I'm building a facebook application that will appear in a tab with the JS SDK. I've added a normal a tag that links to the facebook page of the company who's responsible for the app (https://www.facebook.com/) but when I click this link i get:
Refused to display 'https://www.facebook.com/Somersby?ref=ts&fref=ts' in a frame because it set 'X-Frame-Options' to 'DENY'.
It seems Facebook is blocking links in my application that redirect outside of the app's domain. Is there a way to redirect to the company page? Is there an API available to do this?
I misunderstood what was happening here. I forgot to add target="_top" to the link, so it was trying to change the source of the iframe, not the top level frame. It seems facebook can't be displayed in an iFrame, which was the source of the error message.

Facebook canvas restraints and lightbox or modal

I'm developing an application for Facebook and would like to use a lightbox or modal to display contents larger than the permitted canvas area (560). I don't have much experience with Facebook app development. The research I have completed has given me very little information regarding the issue. Loading a lightbox is fine it is making the the lightbox wider than the viewing area that is the problem.
In order to do this, you would need to be able to access the parent element from inside the iframe but because the content is from 2 different domains (parent content on Facebook server, iframe content on your server) cross domain restrictions apply and you will not be able to. So you will only be able to pop it up inside the 560 width iframe facebook gives you.
I also tried to achieve what you want, but I didn't get success because application called in facebook using iframe. And so that the effect of lightbox,modal or shadow have limited to that iframe width and height.
Simply, I am on conclusion is that the lightbox have not same effect which in normal websites.
In facebook it's limited to only canvas only.

Can I embed my own page in a facebook app?

I want to embed a store locator in Facebook the way footlocker does.
Is it possible to just make a facebook app that serves my stand-alone store-locator page without having to re-write my store-locator page for facebook?
Any good guides/how-tos for serving a stand-alone page through a facebook app like this?
This is very common and easy to do. All you have to do is create a facebook application and point your "canvas url" to your store locator page. So for example, if your store locator is www.example.com/storelocator set your Facebook application's canvas url to that page. If you look at that footlocker app you can see that the url of the iframe is actually http://unlocked.footlocker.com/main_store_locator/
If I understand you correctly, you are looking for the canvas guide. According to the documentation you can show your page in an iframe inside a tab on your facebook page.
Unfortunately, no. When you add a FBML/iframe app to your Facebook page, Facebook loads the content, caches it, and injects it into the DOM; it does not actually load it in an iframe. As such, there are restrictions about which elements can be included (eg, only <body> content), how Javascript is used (external libraries require some tweaking), and any element that references an external source (eg, Flash loading content) must have the target domain whitelisted for your application. In short: it's a pain, but it can be done.