Jump to content

Insert ads into Facebook instant articles

Recommended Posts

Hi, i'm building markup for Facebook Instant Pages and i need to insert my mobile ad format into facebook markup.

This is the code i found on facebook developers(https://developers.facebook.com/docs/instant-articles/reference/ad)

<figure class="op-ad">
    <iframe src="https://www.adserver.com/ss;adtype=banner320x50" height="50" width="320"></iframe>

and also this:

<figure class="op-ad">
    <iframe height="50" width="320">
    	  <!-- Include full ad code here -->

and this is the code i use to load revive ad zones into my websites

<script type='text/javascript'><!--// <![CDATA[
        var OA_zones = {
            'mobile_superbanner' : <?php echo $reviveZones["mobile_superbanner"] ?>,
            'rettangolo_brand' : <?php echo $reviveZones["rettangolo_brand"] ?>,
            'mobile_superbanner_bottom' : <?php echo $reviveZones["mobile_superbanner_bottom"] ?>,
            'rettangolo_1' : <?php echo $reviveZones["rettangolo_1"] ?>,
            'rettangolo_2' : <?php echo $reviveZones["rettangolo_2"] ?>
// ]]> --></script>

then i call this function:

that echoes this:
<script type='text/javascript'>OA_show('".$banner."')</script>


what can i do to serve my banners into instant articles?

Link to comment
Share on other sites

ok but the problem is that i have 10 zones every website and i have (at this time) 27 websites and we're adding websites to expand our network.

anyway i can only use iframe and all our campaigns have the companion positioning active.

If i place 2 banners invocation code (IE 360x100 and 300x250) loaded with iframe is it possibile to load the second one (300x250) from the same campaign of the first one (360x100)?

Link to comment
Share on other sites

Hi francesco,

We have gone through your requirement, Seems companion positioning does not work when the invocation code for the zones is of the iframe tag. It will works with JavaScript tags and also with  Asynchronous JS tag.

Please find the demo URL and provide your FTP details to check with the issue while deliver the ad with Asynchronous Js tag for Companion Positioning to get the solution.

Campaign 1 (Companion Positioning)

Banners :             1. 250x250 ( image name : This spot available)


                                                2. 300x250 ( image name : Adsize 300x250)






Banners:              1. 250x250 (Transparent image)


                                                 2. 300x250 ( Transparent image)




Demo for Javascript Tag:




Demo for Iframe Tag :




Demo for Asynchronous JS Tag :

You can reach me over Skype / Email for the quick discussion.

Skype name : djaxadserver

Arun Krishnan


Link to comment
Share on other sites

Hi Arun, thank you for your answer.

I know how companion positioning works with with js or async js tags (on www.pescaranews.net and all websites of my newtwork i already use companion positioning) the problem is that i need to use it into Facebook Instant Articles (https://developers.facebook.com/docs/instant-articles).

It seems like it is possible to use js code into instant articles using this code:

<figure class="op-ad"><iframe height="100" width="360"><ins data-revive-zoneid="XX" data-revive-id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></ins><script async src="//adserver.com/revive/www/delivery/asyncjs.php"></script></iframe></figure>

<figure class="op-ad"><iframe height="250" width="300"><ins data-revive-zoneid="XX" data-revive-id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></ins><script async src="//adserver.com/revive/www/delivery/asyncjs.php"></script></iframe></figure>

the problem is that also if i use js tags companion positioning doesn't work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...