gpt4 book ai didi

ios - Facebook原生广告无法点击,无 react

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:02:01 25 4
gpt4 key购买 nike

我在iOS应用中添加了facebook原生广告,广告显示,但是点击广告没有反应,也没有弹出详细的广告内容,请问是什么问题?

FBNativeAd *nativeAd = [[FBNativeAd alloc] initWithPlacementID:fanID];
nativeAd.delegate = self;
[nativeAd loadAd];

- (void)nativeAdDidLoad:(FBNativeAd *)nativeAd{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
NSData *iconImageData = [NSData dataWithContentsOfURL:nativeAd.icon.url];
NSData *coverImageData = [NSData dataWithContentsOfURL:nativeAd.coverImage.url];
dispatch_async(dispatch_get_main_queue(), ^{
int adViewCount = (int32_t)[_nativeAdViewArr count];
[self genAdScrollView];
PCNativeAdView *adView = [PCNativeAdView initWithNib];
CGRect rect = adView.frame;
rect.origin.x = (rect.size.width + 10)*adViewCount;
adView.frame = rect;
[_adScrollView addSubview:adView];
[_nativeAdViewArr addObject:adView];
[_adScrollView setContentSize:CGSizeMake((rect.size.width + 10)*(adViewCount + 1), 189)];
adView.adIconImageView.image = [UIImage imageWithData:iconImageData];
adView.adCoverImageView.image = [UIImage imageWithData:coverImageData];

adView.adTitleLabel.text = nativeAd.title;
adView.adBodyLabel.text = nativeAd.body;
adView.adSocialContextLabel.text = nativeAd.socialContext;

NSLog(@"Register UIView for impression and click...");
[nativeAd registerViewForInteraction:adView
withViewController:self];
if ([_nativeAdViewArr count] == 3)
{
[self reloadSubViewRect:-1];
}
});
});

需要保留FBNativeAd实例,我用了一个NSMutableArray保存

最佳答案

需要保留FBNativeAd实例,我用了一个NSMutableArray保存实例。

关于ios - Facebook原生广告无法点击,无 react ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28777303/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com