Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook adapter image mapping issue #256

Open
ogrenichv opened this issue Jun 10, 2020 · 1 comment
Open

Facebook adapter image mapping issue #256

ogrenichv opened this issue Jun 10, 2020 · 1 comment

Comments

@ogrenichv
Copy link

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);
soniccat referenced this issue Dec 15, 2020
PiperOrigin-RevId: 296960813
@soniccat
Copy link

soniccat commented Dec 16, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants