Follow

How to Set Up Facebook Audience Network as an Ad Source

Ad Source Details

Ad Source:

Ad Formats Supported:

aerWall

aerBanner

Ad Type:

HTML Interstitial

HTML Banner

Ad Source Type: SDK
Website: https://developers.facebook.com/products/app-monetization/audience-network/
Sign up Page: https://developers.facebook.com/docs/audience-network
Support: https://developers.facebook.com/tools-and-support/ 

Step 1:  Adding an Ad source

  1. Click the Ad Sources tab
  2. Click the + Button to add an ad source

Step 2:  Fill in the Facebook info

  1. Enter a Name for the ad source (example: Facebook Android Interstitial)
  2. Select Facebook in the dropdown box
  3. Select Ad Type: Banner HTML for Banner Ads, Interstitial HTML for Interstitial Ads
  4. Enter the required FacebookPlacementId field (example: 839999212758459_841267789298268)
  5. Enter the FacebookTestDeviceId - retrieve the ID from the debug log: When testing your app with Facebook's ad units you must specify the device hashed ID to ensure the delivery of test ads. This ID is available from the debug log. 
  6. Enter the optional FacebookBannerAdSize field (BANNER_HEIGHT_50, BANNER_HEIGHT_90,RECTANGLE_HEIGHT_50) - leave blank for INTERSTITIAL Ads
  7. Enter the estimated CPM
  8. Select the desired Placement
  9. Set Priority
  10. Select Countries targeting
  11. Select Device targeting
  12. Click Save

Step 3:  Locating the Facebook Placement ID

Step 3:  Locating Facebook  Placement ID
  1. Log on to the Facebook Developer account platform and click on Account
  2. Click the My Apps Tab
  3. Click the Audience network
  4. Copy the Placement ID - this will be used in Step 3.4 below

Adding the Optional FacebookTestDeviceId

When you run your app on the simulator, test ads will show by default and indicate a successful ad serving call in your app. When testing on a device, however, you must enable test ads by copying the hashed device ID that is printed to the console and set it in code via a dedicated function.

Optional Banner Ad Size

Optional Banner ad size

Banner ad size:

BANNER_HEIGHT_50: (Default) Phone ad size

BANNER_HEIGHT_90: Tablet ad size

RECTABLE_HEIGHT_250: Interstitial ad size

 

Android


 

icon_android-on.png
AerServ SDK
download-sdk.png

 

Step 1.   Locate the Audience Network files inside network-support/Facebook/

Step 2.   Add AudienceNetwork.aar to your app's lib folder, i.e. [Project Name]/app/libs

Step 3.   Add the following settings inside your application's build.gradle


dependencies {
compile(name:'AudienceNetwork', ext:'aar') }

Step 4.   Add the following permission to your AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
 

Step 5.   Add the following activity to your AndroidManifest.xml

<activity 
  android:name="com.facebook.ads.AudienceNetworkActivity"
  android:configChanges="keyboardHidden|orientation|screenSize" />

 

iOS 


 

image.jpg
AerServ SDK
download-sdk.png

 

Step 1.   Add the Audience Network SDK in the folder network-support/Facebook/FBAudienceNetwork.framework into your project frameworks.

Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:

AudioToolbox.framework
AVFoundation.framework
CoreGraphics.framework
CoreImage.framework
CoreMedia.framework
CoreMotion.framework (Set to Optional) FBAudienceNetwork.framework Foundation.framework
libc++.tbd
libxml.tbd
SafariServices.framework (Set to Optional) Security.framework StoreKit.framework
UIKit.framework WebKit.framework (Set to Optional)
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments