我用facebook受众网络实现了本地广告,但当你点击“行动号召”按钮或广告时,什么都不会发生。
我调用method[nativeAd registerViewForInteraction:self.nativeAdView withViewController:nil];但它什么也不做。
我用来创建广告的代码:

 nativeAdView.uxTitle.text = titleForAd;
nativeAdView.uxDescription.text = bodyTextForAd;
[coverImage loadImageAsyncWithBlock:^(UIImage * _Nullable image) {
    nativeAdView.uxImageView.image = image;
}];
//nativeAdView.uxImageView.image = coverImage;
[nativeAdView.uxCTAButton setTitle:titleForAdButton forState:UIControlStateNormal];

FBAdChoicesView *adChoicesView = [[FBAdChoicesView alloc] initWithNativeAd:nativeAd];
[nativeAdView addSubview:adChoicesView];
[adChoicesView updateFrameFromSuperview];


[self.uxScrollView addSubview:nativeAdView];

y += nativeAdView.frame.size.height + 30;
[self.uxScrollView setContentSize:CGSizeMake(self.uxScrollView.frame.size.width, y)];


// Register the native ad view and its view controller with the
// native ad instance
[nativeAd registerViewForInteraction:self.nativeAdView withViewController:nil];

最佳答案

已解决,需要保存nativeAd实例。

关于ios - 本地Facebook受众网络广告不可点击,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39635005/

10-09 06:31