fbAudienceNetwork.*

Type Library
Revision 2017.3145
Keywords ads, advertising, Facebook Audience Network, fbAudienceNetwork
Platforms Android, iOS
Sample https://github.com/coronalabs/plugins-sample-fbAudienceNetwork

Overview

The Facebook Audience Network plugin allows developers to monetize their mobile app with Facebook banner and static interstitial ads.

Important

Facebook has a method for calling test ads which is different from other Corona ad providers. To test ads during implementation of this plugin, you must follow their requirements. Please read the notes in the fbAudienceNetwork.init() documentation and follow the steps to enable test ads.

Versions

The Facebook Audience Network plugin is offered in two varieties, aimed to accommodate different Corona developers and business models:

Monetization through the Facebook Audience Network Free plugin entails a revenue share with Corona Labs in the form of a fixed 5% flat rate, but the ad revenue you see in your Facebook Developer Portal is all yours.

The Facebook Audience Network Paid plugin lets you keep 100% of your ad revenue. It is only available to users who have purchased the Facebook Audience Network Paid plugin.

Registration

Before you can use the Facebook Audience Network, you must set up Audience Network in your app.

Syntax

Facebook Audience Network Free
local fbAudienceNetwork = require( "plugin.fbAudienceNetwork" )
Facebook Audience Network Paid
local fbAudienceNetwork = require( "plugin.fbAudienceNetwork.paid" )

Functions

Events

Project Settings

To use this plugin, add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

Facebook Audience Network Free
settings =
{
    plugins =
    {
        ["plugin.fbAudienceNetwork"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}
Facebook Audience Network Paid
settings =
{
    plugins =
    {
        ["plugin.fbAudienceNetwork.paid"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}
Note

For Android, the following permissions/features are automatically added when using this plugin:

  • "android.permission.INTERNET"
  • "android.permission.ACCESS_WIFI_STATE"