简体   繁体   中英

How to resolve Error = 1001 “No Fill” using Facebook Audience Network in android

I have an Android version of my app and integrated FAN into my Application. It worked for some months but now it's displaying " NO FILL "

Error Domain=com.facebook.ads.sdk Code=**1001 "No fill"** 
UserInfo={NSLocalizedDescription=**No fill**, 
FBAdErrorDetailKey={ msg = "**No fill**"}}

And no FAN ad is shown. If I put a testing ID then it's displaying, but only on my device, not for another device.

How to resolve this problem "No Fill"?

compile 'com.facebook.android:audience-network-sdk:4.+'

Mentioned in build.gradle I've seen many questions regarding this but unable to find an answer.

I've already seen below links:

  1. Facebook AudienceNetwork loaded failure: No fill, Error Message "No fill", what is the reason about FaceBook android Advertise?

  2. facebook audience network testing on test flight No Fill

  3. Audience Network iOS Ads Suddenly Become "No Fill"

  4. Facebook Audience Network returns "No fill"

  5. Testing Audience Network Implementation

Try this.It solves my problem . you have to follow this steps for solve this problem In this all screenshot and steps are given .

May this help you. Because of the update in facebook developer console in audience Network tab ad-spaces group that is newly created from placements . You have to follow this steps. Might it helps others.

I have also posted screenshot along with steps details.

here Click on up-grouped for appName and then follow steps.

  1. Tick check-mark box for any one ad then make placements button will be enable.

  2. Enter name and description related to where ad will display in your app and then click on Move Button在此处输入图片说明

  3. After move one ad you can also select other ad from un-grouped ad and move it to ad-spaces , here it will shoe you choice for move to existing or create new one ad-space.
    在此处输入图片说明

  4. If you want to create new one then select radio button for new one . and click move after enter name and description. 在此处输入图片说明

You need add the test device to test it before your app approved by Facebook. Here is how you can get the device hash.

NSLog(@"the test device hash is %@",[FBAdSettings testDeviceHash]); 

Run the app and copy the testDeviceHash from logs then add it to FBAdSettings .

[FBAdSettings addTestDevice:@"YOUR_TEST_DEVICE_HASH_CODE_HERE"];

You need to do it before you init the FBAdView

I got same error when I want testing ad.

Error: No Fill error code [1001] No fill. We are not able to serve ads to this person.

I didn't register for AD because my app is not live at that moment. So, I don't have advertise Id . I'm using test id "YOUR_PLACEMENT_ID" for demo propose when I got that error. So only test id is not enough for get testing ads in Facebook Ad.

I found solution for that as below.

When You're initialize AudienceNetworkAds then just enable testmode that's it.

AdSettings.setTestMode(true)

class AudienceNetworkInitializeHelper : AudienceNetworkAds.InitListener {

        override fun onInitialized(result: AudienceNetworkAds.InitResult) {
            Log.d(AudienceNetworkAds.TAG, result.message)
        }

        companion object {

            internal fun initialize(context: Context) {
                if (!AudienceNetworkAds.isInitialized(context)) {
                    if (DEBUG) {
                        AdSettings.turnOnSDKDebugger(context)
                        AdSettings.setTestMode(true)// for get test ad in your device
                    }

                    AudienceNetworkAds
                            .buildInitSettings(context)
                            .withInitListener(AudienceNetworkInitializeHelper())
                            .initialize()
                }
            }
        }
}

My audience-network-sdk is implementation 'com.facebook.android:audience-network-sdk:5.4.0' and It's work also in 5.6.0 .

I managed to resolve this issue. My steps:

1. Make sure to set the test device hash in your code

  • Start by testing from the xCode simulator and not your device to make sure it works well.
  • Add this log somewhere (eg viewDidLoad) to display your xCode simulator device hash:
NSLog(@"%@",[FBAdSettings testDeviceHash]);
  • Then set it in your code:
[FBAdSettings addTestDevice:@"YOUR_TEST_DEVICE_HASH"];

2. Make sure you're using the correct placementID

  • Go to Monetization Manager home page
  • Expand Integration on the left menu
  • Click on Properties
  • Copy the ID of your properties and paste it in your code:
- (void)loadNativeAd{
    FBNativeAd *nativeAd = [[FBNativeAd alloc] initWithPlacementID:@"YOUR_PLACEMENT_ID"];
    nativeAd.delegate = self;
    NSLog(@"%@",[FBAdSettings testDeviceHash]);
    [FBAdSettings addTestDevice:@"YOUR_TEST_DEVICE_HASH"];
    [nativeAd loadAd];
}

It worked for me.

试试这个版本,并检查它是否工作

implementation 'com.facebook.android:audience-network-sdk:5.1.0'

My problem was solved, until I logged in with my admin account into facebook app and download again my application from google play.

A few suggestions for you problem: "No Fill" with error code 1001 - is a common error, FAN not returning ads to your ad.

Ensure the following things: - Ad Status with Placement ID (Audience Network> Ad Space> Placement) must be "Enabled and received ad request recently" (1) - Your Ad Status must be reviewed and approved by facebook. (2)

If (1), you can try to disable and enable again. If (2), you must download the facebook app from google play + login with administrator account / or developer / testers (added in Roles tab)), I recommend login with admin account; and download your app directly from google play.

You said your application has been active for some time, and the above things is right, the last is send a message to the Audience Network Team and they will reply in 3-5 business days.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM