Brid iframe generator for Facebook Instant Articles

Due to the requirements by Facebook that all third party player embed codes must be implemented through an iframe, we have created this iframe generator specifically for this use case.

The main reasoning behind this is due to that advertisers need to have a clear view of the domain upon which the player is hosted for them to bid for your inventory. Our iframe generator creates such an iframe that is hosted on your domain so all advertisement analytics should be correct and come from your own domain instead of any other third party domain. This helps immensely with ad CPM and fill rate.

Follow the below guide on how to implement our iframe generator to create Facebook Instant Articles embed codes using the Brid player.

Download the iframe generator

To download the iframe generator please visit our git repo here Click on the downloads link on the left hand menu (or clone the repo) to get access to the brid.php file.

Brid.php setup

Once you download the brid.php file from our git repo, copy it to your webserver and note the path to it. For example: You need to take note of the direct path to this file as you will need it in the next step.

A minimum version of PHP 5.3.0 is needed for the generator to work.

Iframe setup

Now that you have everything setup you can generate your iframe embed code for use with Facebook Instant Articles. Use the following template to create an iframe:

<figure class="op-interactive"> <iframe src="{PATH_TO_brid.php}?id=PLAYER_ID&video=VIDEO_ID&partner_id=PARTNER_ID" allowfullscreen width="640" height="360" frameborder="0" ></iframe> </figure>
Value Description Type
{PATH_TO_brid.php} The direct path to your brid.php file on your server String
id Id of the player you are using Int
video Id of the video you are using Int
partner_id Id of your site in Brid Int
width Width of the player Int
height Height of the player Int

To get the ID of the player you plan on using log into Brid CMS and go into the edit screen of the player you want to use. Note the URL in the browsers address bar. Example:[PLAYER_ID]?partner_id=[PARTNER_ID]

The [PLAYER_ID] placeholder will show the ID of your player.

To get the ID of the video you plan on using log into Brid CMS and go into the edit screen of the video you want to use. Note the URL in the browsers address bar. Example:[VIDEO_ID]?partner_id=[PARTNER_ID]

The [VIDEO_ID] placeholder will show the ID of your video.

You can find your partner ID by logging into the Brid CMS and selecting your site. Click on SETTINGS under your site name and you will see your API partner ID. Example:

With all this information you can create a valid Brid iframe embed code which you can use to show your video and advertisements on Facebook Instant articles from your own and operated domain.