可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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:
Facebook AudienceNetwork loaded failure: No fill, Error Message "No fill", what is the reason about FaceBook android Advertise?
facebook audience network testing on test flight No Fill
Audience Network iOS Ads Suddenly Become "No Fill"
Facebook Audience Network returns "No fill"
Testing Audience Network Implementation
回答1:
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.
Tick check-mark box for any one ad then make placements button will be enable.
Enter name and description related to where ad will display in your app and then click on Move Button
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.
If you want to create new one then select radio button for new one . and click move after enter name and description.
回答2:
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
回答3:
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.
回答4:
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 (e.g. 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.
回答5:
Try this version,and check that it's working or not
implementation 'com.facebook.android:audience-network-sdk:5.1.0'
回答6:
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 .