fbsamples / audience-network

Open source projects to demonstrate SDK and sample code usages and integration, and to collaborate and support peers in this community.
https://developers.facebook.com/docs/audience-network
Other
319 stars 370 forks source link

Always got this error com.facebook.ads.AdError@26b7ba5 #123

Closed dipankar108 closed 3 years ago

dipankar108 commented 3 years ago
            interstitial = new com.facebook.ads.InterstitialAd(this, "MyplacementId");
            InterstitialAdListener interstitialAdListener = new InterstitialAdListener() {

                @Override
                public void onError(Ad ad, AdError adError) {
                    Log.v(TAG, " interstitial ads not loaded"+adError.toString());

                }

                @Override
                public void onAdLoaded(Ad ad) {

                }

                @Override
                public void onAdClicked(Ad ad) {
                    Log.v(TAG, " interstitial ads  onclicked");
                }

                @Override
                public void onLoggingImpression(Ad ad) {
                    Log.v(TAG, " interstitial ads  login");
                }

                @Override
                public void onInterstitialDisplayed(Ad ad) {
                    Log.v(TAG, " interstitial ads  displayed");
                }

                @Override
                public void onInterstitialDismissed(Ad ad) {
                    Log.v(TAG, " interstitial ads  dismissed");
                }
            };
            interstitial.loadAd(
                    interstitial.buildLoadAdConfig()
                            .withAdListener(interstitialAdListener)
                            .build());
Faboor commented 3 years ago

Please provide the error code and error message from the AdError. Most likely you have misconfigured your placement. See https://developers.facebook.com/docs/audience-network/guides/test/checklist-errors/ for most common errors.

Closing as report not actionable.