3

I am unable to mediate between admob and facebook audience network (FAN) in android app. The app is only serving ads from Admob network. The mediation between Admob and FAN is not working. Below is the process I have followed:

  1. Integrated Admob in Android app. This is working fine.
  2. Created a new developer account in facebook.
  3. Added a new app (application id) in facebook.
  4. Added two publishers id in facebook (one for banner and other for interstitial)
  5. Included the adapter jar in the eclipse and added it to build path
  6. Downloaded facebook sdk and added the classes.jar in eclipse. Added this to build path.
  7. Added meta-data for facebook app id in Android Manifest
  8. Project is compiled without any errors
  9. Made proguard changes as per the instruction available at: https://firebase.google.com/docs/admob/android/mediation#include_network_adapters_and_sdks
  10. Added mediation entries in Admob with ecpm 0.01 and 5.00.

When I run the code, I only get test ads from admob. On facebook, i see no ad requests. Till facebook doesn't recieves the ad request, it won't validate the app and ads.

Not sure if I need to make any change to android code. I am using the same code that worked for admob. It is just that I have now included the facebook jars and made changes to manifest file. No change is made to java code files or xml files?

Also, does facebook need activity context in adview request? I have adview defined in XML so I don't knw how to pass the activity context.

The code is driving me crazy.. and there is no single documentation available on how to make admob and FAN work in android code..

Hussein El Feky
  • 6,627
  • 5
  • 44
  • 57
DevDev
  • 71
  • 1
  • 3

3 Answers3

2

Prioritize facebook so the traffic/request will go to facebook instead admob just for testig purposes.

In my case to redirect traffic to facebook I set admob floor eCPM to $50 so it won't be served and surely it will try facebook since you configured it in the mediation stack.

NOTE: DO not use test ads on admob when doing above. Use real ads just don't click on it.

mboy
  • 744
  • 7
  • 17
1

Here's what I did: For Facebook to validate your app, deactivate the mediation in your code and try loading just a Facebook ad instead as they show on their how-to-page. Once you see the ad from Facebook the status of your App turns to "validating". For me after like 3-4 hours it changed to "ready".

Richard R
  • 873
  • 6
  • 20
  • Hi @Richard R, I faced the same problem and tried what you said. I got the Facebook Ad successfully. However in my FB monetization manager I don't see any status. As of now I still couldn't get any FB ads from my Admob mediation. Can you please let me know where do you see this 'Validating' or 'Ready' status? – Zane Jan 21 '21 at 13:45
1

To get the Facebook ads delivered to your device, you need to have Facebook app installed and logged-in at least once. Do the following:

  1. Install the Facebook app on your phone

  2. Log in to the Facebook app with the same account from which you are requesting the ads

  3. Now open your own app and request the ads from Facebook. If your integration is fine, you should get the ads.

user846316
  • 6,037
  • 6
  • 31
  • 40