How to resolve Error = 1001 "No Fill" using Facebook Audience Network in android
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
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.
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 .