เอกสารนี้นี้ได้รับการอัพเดตแล้ว
คำแปลเป็น ภาษาไทย ยังไม่เสร็จสมบูรณ์
ภาษาอังกฤษที่อัพเดต: 5 ส.ค. 2021
ภาษาไทย ที่อัพเดต: 26 พ.ย. 2018

Server to Server: Bidding Integration Testing

In-house mediation is not publicly available

In-house bidding with Audience Network is currently in Closed Beta and is not publicly available. We'll provide further updates if this changes.

As an alternative, you can access Audience Network Bidding through one of the mediation platforms we partner with.

When you've finished server-to-server bidding integration, you should test your implementation on physical devices with production ads before rolling it out. Use the latest Audience Network SDK in your integration to include the most recent bug fixes and improvements. The following sections provide step-by-step guidance on how to test your bidding integration with your test app.

Prerequisites

Step 1: Test with Production Ads

Step 2: Test with Demo Ads

Step 1: Test with Production Ads

Testing with production ads is a 3-step process.

  1. Add people to your business settings page to enable them to see production ads before the app is approved.
  2. Assigned testers to use your app or mobile website while logged in to Facebook.
  3. Ensure 'test':'0' in your client.

Adding Testers To Your App

You can test your app or mobile website on physical devices with production ads by ensuring the person testing is added to your Facebook property in any role. This is the recommended method of adding testers to your app:

  1. Go to your Business Settings.
  2. Click +Add on the People tab on the left.
  3. Type the email address of the person you want to your account in Business Manager. You can enter multiple people here.
  4. You can assign people roles if you wish or you can click Skip to only add them to your account in Business Manager.

If you are using a 3rd party auction server, please make sure that it is properly integrated with Audience Network and is sending us bid requests.

When testing your ad placements, Facebook will intentionally send a no-fill for about 20% of requests to allow you to test how your app or mobile website handles the no-fill case.

Step 2: Test with Demo Ads

You should ensure that the user testing your app is added to a role on your app's Business Manager. This is the recommended testing method as it lets you see production ads on physical devices. See the Testing With Production Ads section for more information on the recommended testing method.

However, as noted in the previous section, you may realize that it is not always possible to test the UI of production ads with your app's UI views. In addition, you cannot guarantee that the ad received by your app will be an image ad, video ad or carousel ad. Requesting production ads will not guarantee the content and format of the ad returned. What if you want to test with an ad that contains portrait video content to make sure it looks correct with your app's UI view?

To request a demo ad, you will use the following demo ad type string to concatenate the placement ID with '#' when initializing any Facebook ad object. The placement ID template for requesting demo ads is DEMO_AD_TYPE#YOUR_PLACEMENT_ID.

You should never ship your app to the public with the above test code as it will cause only demo ads to be shown%. You should instead use a preprocessor macro such as DEBUG or TESTING and then use #ifdef to distinquish a test build from a release build.

Demo Ad Type Table

Test Ad Type Description Supported Ad Format

VID_HD_16_9_46S_APP_INSTALL

16x9 HD video 46 sec ad with app install CTA option

Interstitial, Rewarded Video, Native

VID_HD_16_9_46S_LINK

16x9 HD video 46 sec ad with link CTA option

Interstitial, Rewarded Video, Native

VID_HD_16_9_15S_APP_INSTALL

16x9 HD video 15 sec ad with app install CTA option

Interstitial, Rewarded Video, Native

VID_HD_16_9_15S_LINK

16x9 HD video 15 sec ad with link CTA option

Interstitial, Rewarded Video, Native

VID_HD_9_16_39S_APP_INSTALL

9x16 HD video 39 sec ad with app install CTA option

Interstitial, Rewarded Video, Native

VID_HD_9_16_39S_LINK

9x16 HD video 39 sec ad with link CTA option

Interstitial, Rewarded Video, Native

IMG_16_9_APP_INSTALL

16x9 image ad with app install CTA option

Banner, Native Banner, Interstitial, Native

IMG_16_9_LINK

16x9 image ad with link CTA option

Banner, Native Banner, Interstitial, Native

CAROUSEL_IMG_SQUARE_APP_INSTALL

carousel ad with square image and app install CTA option

Interstitial, Native

CAROUSEL_IMG_SQUARE_LINK

carousel ad with square image and link CTA option

Interstitial, Native

When testing your ad placements with demo ad type, please pay attention to Supported Ad Format. For example, if you create Rewarded Video Instance to request ad with demo ad type IMG_16_9_APP_INSTALL, you will get display error.

You can still test your integration even without prefixing demo ad type. All you need to do is to set the test field to 1 in the bidding request.