Open mowaiskalam opened 6 years ago
Is there anyone to reply? @floatinghotpot
+1
@mowaiskalam, and whoever else stumbles upon this, I've found that the coordinates for FacebookAds.setNativeAdClickArea
are in pixels relative to the viewport. It works for me now, here is some of my code:
...
let x, y, w, h;
let viewportOffset = adElement.getBoundingClientRect();
w = adElement.clientWidth;
h = adElement.clientHeight;
x = adElement.offsetLeft;
y = viewportOffset.top;
FacebookAds.setNativeAdClickArea(adId, x, y, w, h);
...
I am using Facebook Ads in my app but I am facing following issue:
Success function callback is firing properly when calling FacebookAds.setNativeAdClickArea but the click is not working. I have double checked all parameter (adId, x,y,w,h) is fine.
I am using Ad in Testing Mode
Can anyone facing the same issue? Please help me if anyone knows how to resolve it?