     case .none:
       assert(false)
     case .facebook:
-      configFBBanner(ad: ad as! FBNativeAd)
+      configFBBanner(ad: (ad as! FacebookBanner).nativeAd)
     case .rb:
       configRBBanner(ad: ad as! MTRGNativeAd)
     case .mopub:

  private func configFBBanner(ad: FBNativeAd) {
    let adCallToActionButtons: [UIView]
    if (state == .search) {
      adCallToActionButtons = [self]
    } else {
      adCallToActionButtons = [adCallToActionButtonCompact, adCallToActionButtonDetailed]
    }

      adTitleLabel.numberOfLines = config.numberOfTitleLines
      adBodyLabel.numberOfLines = config.numberOfBodyLines
      detailedModeConstraints.forEach { $0.priority = config.priority }
      setNeedsLayout()
      UIView.animate(withDuration: kDefaultAnimationDuration) { self.layoutIfNeeded() }
      refreshBannerIfNeeded()
