我使用Facebook受众群体网络实施了原生广告,但是当您点击号召性用语按钮或广告时,没有任何反应。
我调用方法[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];
答案 0 :(得分:0)
解决了,需要保存nativeAd实例。