'Expo FB Audience Network Ad Mediation with IronSource / MAX-AppLovin

I am using Expo and managed to show FB Audience Network Ad with below code. But FB now require ad bidding so I need to add at least one more advertising network, preferably IronSource or MAX/AppLovin. But all the document only show React Native setup only. I am very confused on:

  1. Do I need to setup another ad network ad in my Expo App? Or the current FB ad should show the ad with highest bidding automatically?
  2. Does Expo even capable to include IronSource or MAX/AppLovin ad at all, preferably without ejecting.
const [isLoaded, setIsLoaded] = useState(false);
  const bannerId =
    Platform.OS === "ios"
      ? "xxxxx"
      : "yyyyy";

FacebookAds.AdSettings.requestPermissionsAsync().then((permissions) => {
    let canTrack = permissions.status === "granted";
    FacebookAds.AdSettings.setAdvertiserTrackingEnabled(canTrack);
    setIsLoaded(true);
  });

  function getBannerAd() {
    if (isLoaded && !hasPurchased) {
      return (
        <FacebookAds.BannerAd
          placementId={bannerId}
          type="standard"
          onPress={() => console.log("click")}
          onError={(error) =>
            console.log("error from banner ", error.nativeEvent)
          }
        />
      );
    } else {
    }
  }

return {!hasPurchased && (
              <View
                style={{
                  backgroundColor: "white",
                  height: 50,
                  padding: 1,
                  width: width,
                }}
              >
                {getBannerAd()}
              </View>
            )}

Please let me know any thoughts or example on how to make FB Ad mediation work in Expo. Many thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source