原生Facebook受众网络广告无法点击

时间:2016-09-22 09:18:26

标签: ios objective-c swift facebook facebook-audience-network

我使用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];

1 个答案:

答案 0 :(得分:0)

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