Facebook

Create an Application in Facebook

1. Go to Facebook for developers and log in to your Facebook account.fb_en_1.jpg

2. Click Getting Started (If there are other apps in your account, please skip to this step).fb_en_2.jpg

3. Select Developer options.fb_en_3.jpg

4. Click Create First App.fb_en_4.jpg

If you already have other apps in your account, please click My Apps Add a New App.fb_en_5.jpg

5. After filling in the relevant information, click Create Application ID.fb_en_6.png

  • App Display NameThe app name associated with your app ID.
  • App Contact EmailThis email address is used to contact you about potential policy violations, app restrictions or steps to recover the app if it's been deleted or compromised.

6. If your app is already on the app store, please click SettingsBasic and fill in the relevant information.fb_en_7.jpg

If your app is not yet available on the app store, please go to Facebook Audience Network app creation.
Please complete the relevant information here after your app is available.

7. click Add Platform at the bottom of the page.fb_en_8.jpg

  • [iOS]fb_en_9.jpg
  • [Android] fb_en_10.jpg

Key hash:

Please execute this command in Mac: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

Please execute this command in Windows:  keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64

 
This command will generate a 28-character private key hash for your development environment. Please copy and paste the key hash into the space below. You need to provide the development key hash of the development environment for each staff member of the application.
 
If your application is published, you also need to add the hash of the publishing key.
 

Android apps must use the release key as a digital signature to upload to the app store. To generate a distribution key hash, execute the following command on Mac or Windows, replacing your distribution key alias and keystore path: keytool -exportcert -alias YOUR_RELEASE_KEY_ALIAS -keystore YOUR_RELEASE_KEY_PATH | openssl sha1 -binary | openssl base64

This will generate a string of 28 characters. Please copy and paste the string into the space below. Also, check the Android documentation to learn how to sign the app.

 

Facebook Audience Network Application Creation

1. On the Facebook for developer dashboard, click the Audience Network Set Up button.fb_en_11.jpg

Please make sure you have selected the correct app on the top left.fb_en_11_1.jpg

2. Choose to Start Now.fb_en_12.jpg

3. After selecting your business management platform, click Continue.

fb_en_14.jpg

4. After naming your app, click Next.fb_en_15.jpg

Assets are a concept proposed by Facebook Audience Network. If your product has different versions according to operating systems or devices, you can combine these versions into one asset for centralized management and performance reports.

Each asset can include iOS app, Android app, Instant Articles platform and Instant Games app.

Learn more.

5. Choose your application platform.fb_en_16.jpg

You can add more platforms in the Monetization Manager, IntegrationsAssets.

6. If your app is already on the app store, please fill in the app store address. Facebook will conduct an app review. Your app needs to comply with Facebook Audience Network Policy and Facebook Community Standards before it can be approved; if your app is not yet on the app store, you can choose to test the app after it’s on the shelf and submit it to the app store The URL can be monetized using Facebook Audience Network.fb_en_17.jpg

You don’t need to check This app is using mediation.

 

Facebook Audience Network Placement

1. Select the Ad Placement you need to create.fb_en_18.jpg

Note that if you want to create a banner ad slot, please choose Banner instead of Native Banner. Learn more.

You can add more Placement or more Ad Spaces in Integration Properties.

Learn more.

fb_en_19.jpgfb_en_20.jpg

 

Facebook Placement Price Setting

1. You can set a reserve price for a placement when you create or edit placement.fb_en_21.jpgfb_en_22.jpg

Learn more.

 

AdTiming Platform Configuration

Ad Network

1. Enter the AdTiming publisher platform, click on Ad Network → click Edit behind Facebook.___22.jpg

2. After filling in the relevant information, click Save.___23.jpg

  • App ID: Please select the first half of the underscore parameter in your Unit ID
    • For example: your Unit ID is: 636435993620146_636462546950824, then your App ID please fill in 636435993620146.
  • System User Access Token: You need to enter the Business Management Platform to set up a login account, and complete the following steps to obtain it.

 

Create system user

a. Click on the System Users and select Add.

If you already have a system user, please skip to Adding a system user to the corresponding application.fb_en_23.jpg

b. Enter the system user name and select the identity as the Admin.fb_en_24.jpg

 

Add system users to the corresponding application

a. Click Account → Apps → Select the corresponding application → Add People.fb_en_25.jpg

b. Select the created System User and grant management application permissions.fb_en_26.jpg

 

Add system users to corresponding properties

a. Click Data SourcesProperties → Select the corresponding asset → Add People.fb_en_27.jpg

b. Select the created system user and click Manage Property.fb_en_28.jpg

 

Generate Token

a. Click on System Users in the left navigation bar → Guide System UserGenerate New Token.fb_en_29.jpg

b. After selecting the corresponding application, check read_audience_network_insights, and click Generate Token. 

fb_en_30.jpg

c. Copy the Token and paste it to the AdTiming platform System User Access Token.fb_en_31.jpg

 

Add Instance

1. Click Mediation → Ad unitAdd Instance.___33.jpg

2. After filling in the relevant information, click Save.___33___.jpg

  • Ad NetwrokSelect Facebook.

  • Instance Name: You can define the name of your ad unit yourself, we suggest you name it: AdTiming Placement ID_Ad Network Name_ Country_Floor Price. (E.g: 6539_FB_USA_40)

  • Unit ID:You can obtain the AdUnit ID in the Monetization Manager.fb_en_32.jpg

 

Facebook Test Mode

It is very important to enable the test mode for testing. We recommend that you test in the following ways before the app is released to avoid violating the Facebook Audience Network Policy and causing your app to not be able to monetize normally using Facebook Audience Network.

1. Go to theMonetization Manager, click Integration Testing.fb_en_33.jpg

2. Add test devices.fb_en_34.jpg

3.Enable testing for your devices.fb_en_35.jpg

 

Add the Facebook SDK&Adapter to Your Build

Android

1. Add the Facebook SDK

  •   Add to your application-level build.gradle file.
 dependencies {
   ...
    implementation 'com.facebook.android:audience-network-sdk:6.0.0'
 }

2. Add the Facebook Adapter

     AdTiming supports both Gradle dependencies and Manual download mechanisms.

       Gradle dependencies

  • Add the following in your project-level build.gradle file.
...
 allprojects {
   repositories {
        ...

        jcenter()
        maven {
            url "https://dl.adtiming.com/android-sdk"
        }
   }
 }
  • Add the following in your application-level build.gradle file.
implementation 'com.adtiming.adapters:facebook:3.7.0@aar'

       Manual download

  • Download the Facebook Adapter from here.
  • Add the Facebook Adapter to Your Project
    Add the FacebookAdapter-x.x.x.aar to the libs folder in your Android Project.
  • Make sure you add the following to your Gradle build file under the dependencies section:
implementation (name:'FacebookAdapter-x.x.x', ext:'aar'

 3. For Proguard Users Only

If you are using ProGuard with the Facebook adapter, you must add the following code to your ProGuard configuration (Android Studio: proguard-rules.pro or Eclipse: proguard-project.txt):

-keep class com.facebook.ads.** { *; }

 

iOS

AdTiming supports both Cocoapods and Manualdownload mechanisms.

Cocoapods

To Integrate the Facebook SDK with Cocoapods, enter the following line in your podfile and you are good to go!

pod 'FBAudienceNetwork'
Copy

Manual Download

1. Download the Facebook framework

  • you can find the lastest Facebook SDK here.

2. Add the Facebook frameworks to your Project

Done!
You are now all set to deliver Facebook Audience Network Ads through the AdTiming Mediation platform!

Was this article helpful?
3 out of 3 found this helpful

Comments

0 comments

Please sign in to leave a comment.