You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When native ad loaded and adapter code maps images it is not correctly maps ad cover image.
i.e. for every image it calls getUrl method (for example mNativeBannerAd.getAdIcon().getUrl()) but for some reason when it maps ad cover image it calls 'toString' method.
So when tested with test facebook native ad I expected to see some valid url, instead I got this: com.facebook.ads.NativeAdBase$Image@9d27786. When modified adapter class and replaced toString with getUrl it returned valid image url: https://static.xx.fbcdn.net/rsrc.php/v3/yy/r/kM1yn3XZUa2.png
The code I'm refering:
// Map all required assets (headline, one image, body, icon and call to
// action).
setHeadline(mNativeAd.getAdHeadline());
List<com.google.android.gms.ads.formats.NativeAd.Image> images = new ArrayList<>();
images.add(
new FacebookAdapterNativeAdImage(Uri.parse(mNativeAd.getAdCoverImage().toString())));
setImages(images);
The text was updated successfully, but these errors were encountered:
It seems, it isn't supported as Facebook ad is quite complicated (carousel, video, image blur etc.). Therefore we must use Facebook media view only... That's why Facebook adapter put Facebook media view in a google mapper.
When native ad loaded and adapter code maps images it is not correctly maps ad cover image.
i.e. for every image it calls
getUrl
method (for examplemNativeBannerAd.getAdIcon().getUrl()
) but for some reason when it maps ad cover image it calls 'toString' method.So when tested with test facebook native ad I expected to see some valid url, instead I got this:
com.facebook.ads.NativeAdBase$Image@9d27786
. When modified adapter class and replacedtoString
withgetUrl
it returned valid image url:https://static.xx.fbcdn.net/rsrc.php/v3/yy/r/kM1yn3XZUa2.png
The code I'm refering:
The text was updated successfully, but these errors were encountered: