Flutter Facebook Audience Network

Last update: Jun 9, 2022

facebook_audience_network

Pub GitHub Awesome Flutter

Facebook Audience Network plugin for Flutter applications (Android & iOS).

Banner Ad Native Banner Ad Native Ad
Banner Ad Native Banner Ad Native Ad
Interstitial Ad Rewarded Video Ad
Interstitial Ad Rewarded Ad

Getting Started

1. Initialization:

For testing purposes you need to obtain the hashed ID of your testing device. To obtain the hashed ID:

  1. Call FacebookAudienceNetwork.init() during app initialization.
  2. Place the FacebookBannerAd widget in your app.
  3. Run the app.

The hased id will be in printed to the logcat. Paste that onto the testingId parameter.

FacebookAudienceNetwork.init(
  testingId: "37b1da9d-b48c-4103-a393-2e095e734bd6", //optional
);
IOS Setup

In Pod file, set the IOS deployment target version to 9.0

IN iOS, Banner, Interstital and Native Ads are supported

2. Show Banner Ad:

Container(
  alignment: Alignment(0.5, 1),
  child: FacebookBannerAd(
    placementId: Platform.isAndroid ? "YOUR_ANDROID_PLACEMENT_ID" : "YOUR_IOS_PLACEMENT_ID",
    bannerSize: BannerSize.STANDARD,
    listener: (result, value) {
      switch (result) {
        case BannerAdResult.ERROR:
          print("Error: $value");
          break;
        case BannerAdResult.LOADED:
          print("Loaded: $value");
          break;
        case BannerAdResult.CLICKED:
          print("Clicked: $value");
          break;
        case BannerAdResult.LOGGING_IMPRESSION:
          print("Logging Impression: $value");
          break;
      }
    },
  ),
)

3. Show Interstitial Ad:

FacebookInterstitialAd.loadInterstitialAd(
  placementId: "YOUR_PLACEMENT_ID",
  listener: (result, value) {
    if (result == InterstitialAdResult.LOADED)
      FacebookInterstitialAd.showInterstitialAd(delay: 5000);
  },
);

4. Show Rewarded Video Ad:

(Android Only)

FacebookRewardedVideoAd.loadRewardedVideoAd(
  placementId: "YOUR_PLACEMENT_ID",
  listener: (result, value) {
    if(result == RewardedVideoResult.LOADED)
      FacebookRewardedVideoAd.showRewardedVideoAd();
    if(result == RewardedVideoResult.VIDEO_COMPLETE)
      print("Video completed");
  },
);

5. Show Native Ad:

  • NativeAdType NATIVE_AD_HORIZONTAL & NATIVE_AD_VERTICAL ad types are supported only in iOS. In Android use NATIVE_AD.
FacebookNativeAd(
  placementId: "YOUR_PLACEMENT_ID",
  adType: NativeAdType.NATIVE_AD,
  width: double.infinity,
  height: 300,
  backgroundColor: Colors.blue,
  titleColor: Colors.white,
  descriptionColor: Colors.white,
  buttonColor: Colors.deepPurple,
  buttonTitleColor: Colors.white,
  buttonBorderColor: Colors.white,
  keepAlive: true, //set true if you do not want adview to refresh on widget rebuild
  keepExpandedWhileLoading: false, // set false if you want to collapse the native ad view when the ad is loading 
  expandAnimationDuraion: 300, //in milliseconds. Expands the adview with animation when ad is loaded
  listener: (result, value) {
    print("Native Ad: $result --> $value");
  },
),

6. Show Native Banner Ad:

Use NativeBannerAdSize to choose the height for Native banner ads. height property is ignored for native banner ads.

FacebookNativeAd(
  placementId: "YOUR_PLACEMENT_ID",
  adType: NativeAdType.NATIVE_BANNER_AD,
  bannerAdSize: NativeBannerAdSize.HEIGHT_100,
  width: double.infinity,
  backgroundColor: Colors.blue,
  titleColor: Colors.white,
  descriptionColor: Colors.white,
  buttonColor: Colors.deepPurple,
  buttonTitleColor: Colors.white,
  buttonBorderColor: Colors.white,
  listener: (result, value) {
    print("Native Ad: $result --> $value");
  },
),

Check out the example for complete implementation.

iOS wrapper code contribution by lolqplay team from birdgang

Note: Instream video ad has been removed by Facebook. Read more here

Future Work

Implement Rewarded video for iOS platform.

GitHub

https://github.com/dreamsoftin/facebook_audience_network
Comments
  • 1. Native Banner Ad blank space if Ad not loaded

    The fill rate inside my app is less than 30% these days thats why most of the users see a blank space instead of ad. Is there any way i can show a custom ad to promote my other app or atleast hide that blank space?

    This is the sole reason I have removed native banner ads from the app for now because the empty space make the UI look ugly :(

    Reviewed by Omi231 at 2020-05-04 12:50
  • 2. Test ads are working but real ads are not appearing

    Hi, the test ads are appearing perfectly. But when I add my placement id, ads are not appearing. .

    D/FBAudienceNetwork(21439): SDK dex loading time: 87
    I/ProxyCache(21439): Proxy cache server started. Ping it...
    D/ProxyCache(21439): Open connection  to http://127.0.0.1:42043/ping
    E/ProxyCache(21439): Error reading ping response
    E/ProxyCache(21439): com.facebook.ads.internal.kd: Error opening connection for http://127.0.0.1:42043/ping with offset 0
    E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:66)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg.a(SourceFile:131)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.a(SourceFile:1060)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.call(SourceFile:396)
    E/ProxyCache(21439):    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    E/ProxyCache(21439):    at java.lang.Thread.run(Thread.java:764)
    E/ProxyCache(21439): Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
    E/ProxyCache(21439):    at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)
    E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)
    E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
    E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
    E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:145)
    E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:61)
    E/ProxyCache(21439):    ... 7 more
    E/FBAudienceNetwork(21439): You don't call AudienceNetworkAds.initialize(). Some functionality may not work properly.
    D/AdInternalSettings(21439): Test mode device hash: deb67081-d21d-4208-989c-ac24fcd2cc8a
    D/AdInternalSettings(21439): When testing your app with Facebook's ad units you must specify the device hashed ID to ensure the delivery of test ads, add the following code before loading an ad: AdSettings.addTestDevice("deb67081-d21d-4208-989c-ac24fcd2cc8a");
    E/FBAudienceNetwork(21439): You are using custom Application class and don't call AudienceNetworkAds.isInAdsProcess(). Multi-process support will be disabled. Please call AudienceNetworkAds.isInAdsProcess() if you want to support multi-process mode.
    D/ProxyCache(21439): Open connection  to http://127.0.0.1:42043/ping
    E/ProxyCache(21439): Error reading ping response
    E/ProxyCache(21439): com.facebook.ads.internal.kd: Error opening connection for http://127.0.0.1:42043/ping with offset 0
    E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:66)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg.a(SourceFile:131)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.a(SourceFile:1060)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.call(SourceFile:396)
    E/ProxyCache(21439):    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    E/ProxyCache(21439):    at java.lang.Thread.run(Thread.java:764)
    E/ProxyCache(21439): Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
    E/ProxyCache(21439):    at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)
    E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)
    E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
    E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
    E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:145)
    E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:61)
    E/ProxyCache(21439):    ... 7 more
    I/flutter (21439): Native Banner Ad: NativeAdResult.ERROR --> {error_message: No fill, error_code: 1001, invalidated: true, placement_id: 383262725809870_384072102395599}
    D/ProxyCache(21439): Open connection  to http://127.0.0.1:42043/ping
    E/ProxyCache(21439): Error reading ping response
    E/ProxyCache(21439): com.facebook.ads.internal.kd: Error opening connection for http://127.0.0.1:42043/ping with offset 0
    E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:66)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg.a(SourceFile:131)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.a(SourceFile:1060)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.call(SourceFile:396)
    E/ProxyCache(21439):    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    E/ProxyCache(21439):    at java.lang.Thread.run(Thread.java:764)
    E/ProxyCache(21439): Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
    E/ProxyCache(21439):    at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)
    E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)
    E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
    E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
    E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:145)
    E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:61)
    E/ProxyCache(21439):    ... 7 more
    I/flutter (21439): Native Ad: NativeAdResult.ERROR --> {error_message: No fill, error_code: 1001, invalidated: true, placement_id: 383262725809870_384038435732299}
    E/ProxyCache(21439): Shutdown server... Error pinging server [attempts: 3, max timeout: 1200].
    I/ProxyCache(21439): Shutdown proxy server
    E/ProxyCache(21439): HttpProxyCacheServer error
    E/ProxyCache(21439): com.facebook.ads.internal.km: Error during waiting connection
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg$g.run(SourceFile:1267)
    E/ProxyCache(21439):    at java.lang.Thread.run(Thread.java:764)
    E/ProxyCache(21439): Caused by: java.net.SocketException: Socket closed
    E/ProxyCache(21439):    at java.net.PlainSocketImpl.socketAccept(PlainSocketImpl.java:205)
    E/ProxyCache(21439):    at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:451)
    E/ProxyCache(21439):    at java.net.ServerSocket.implAccept(ServerSocket.java:547)
    E/ProxyCache(21439):    at java.net.ServerSocket.accept(ServerSocket.java:515)
    E/ProxyCache(21439):    at com.facebook.ads.internal.kg$g.run(SourceFile:1262)
    E/ProxyCache(21439):    ... 1 more
    

    I am getting ad requests but no fill rate image

    Any help is appreciated

    Reviewed by dheerajbred at 2019-05-29 10:14
  • 3. Version 0.6.0 iOS not building

    Hi, thanks for this great plugin.

    I used the git version for IOS and it was working correctly, i updated now to version 0.6.0 but can't get the build to work. i tried with pod deintegrate pod update, deleting the pods folder, podfile.lock, but to no avail.

    The error i get is:

    ` === BUILD TARGET facebook_audience_network OF PROJECT Pods WITH CONFIGURATION Debug === /Users/davidbarbieri/development/flutter/.pub-cache/hosted/pub.dartlang.org/facebook_audience_network-0.6.0/ios/Classes/FacebookAudienceNetworkPlugin.m:3:9: fatal error: 'facebook_audience_network-Swift.h' file not found #import "facebook_audience_network-Swift.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.

    Could not build the application for the simulator. Error launching application on iPhone 11 Pro Max. `

    Thanks!

    Reviewed by davidBarbieri at 2020-05-26 18:24
  • 4. Remove blank black color

    Thanks for the plugin, I have been waiting for admob alternatif plugin for flutter,

    Can the blank black color in native ads changed with custom color or a loading indicator / shimmer before the ad is loaded? And what if the device doesnt have facebook installed? The ad wont show, so it would be good if there is a fallback view instead showing blank black space.

    Reviewed by karnadii at 2019-05-06 09:02
  • 5. Getting error for height in IOS but works totally fine in Android

    Hi I am getting this error in IOS, but in Android, it works fine.

    The following _TypeError was thrown building FacebookNativeAd(dirty, dependencies: [MediaQuery], state: _FacebookNativeAdState#fefd9):
    type 'int' is not a subtype of type 'double'
    

    Here is the code

    class FacebookNativeBannerAdWidget extends StatefulWidget{
      final double width;
      final double height;
      final Color backgroundColor;
      final Color titleColor ;
      final Color descriptionColor;
      final Color buttonColor;
      final Color buttonTitleColor;
      final Color buttonBorderColor;
    
      const FacebookNativeBannerAdWidget({Key key,@required this.width,@required this.backgroundColor,
              @required this.titleColor,@required this.descriptionColor,@required this.buttonColor,@required this.buttonTitleColor,
              @required this.buttonBorderColor,@required this.height}) : super(key: key);
    
      @override
      _FacebookNativeBannerAdWidgetState createState() => _FacebookNativeBannerAdWidgetState();
    }
    
    class _FacebookNativeBannerAdWidgetState extends State<FacebookNativeBannerAdWidget> {
    
      @override
      void initState() {
        super.initState();
    
        FacebookAudienceNetwork.init(
          // puting device-id for testing only
          // IOS
          testingId: "7d1416eb-c8c4-4b81-b1a8-4e0c8045bb76",
          // Android Emulator
          // testingId: "d18eeefd-1ab0-4bca-a479-4bfc6073379e",
        );
      }
    
      @override
      Widget build(BuildContext context) {
        return FacebookNativeAd(
          adType: NativeAdType.NATIVE_BANNER_AD,
          placementId: Platform.isAndroid ? '603201673930615_606066876977428' : '603201673930615_606067633644019',
          width: widget.width,
          height: widget.height < 50.0 ? 50.0 : widget.height > 50.0 && widget.height < 120.0 ? 100.0 : 120.0 ,
          bannerAdSize: widget.height < 50.0 ? NativeBannerAdSize.HEIGHT_50 : widget.height > 50.0 && widget.height < 120.0 ? NativeBannerAdSize.HEIGHT_100 : NativeBannerAdSize.HEIGHT_120,
          backgroundColor: widget.backgroundColor,
          titleColor: widget.titleColor,
          descriptionColor: widget.descriptionColor,
          buttonColor: widget.buttonColor,
          buttonTitleColor: widget.buttonTitleColor,
          buttonBorderColor: widget.buttonBorderColor,
          keepExpandedWhileLoading: false,
          listener: (result, value) {
            print("Native Ad: $result --> $value");   
            }
          );
      }
    
    Reviewed by AlohaTiger at 2020-08-03 15:30
  • 6. iOS Integration Issue

    I really appreciate the work being put in to allow for iOS integration, but I'm running into a bit of an issue that's preventing my project from running. When I try to run the project, the following error is printed to the console:

    Launching lib/main.dart on iPhone 11 Pro in debug mode...
    Running pod install...                                              1.0s
    CocoaPods' output:
    ↳
      Preparing
    Analyzing dependencies
    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `connectivity` from `.symlinks/plugins/connectivity/ios`
    -> Fetching podspec for `connectivity_macos` from `.symlinks/plugins/connectivity_macos/ios`
    -> Fetching podspec for `facebook_audience_network` from `.symlinks/plugins/facebook_audience_network/ios`
    -> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
    -> Fetching podspec for `path_provider_macos` from `.symlinks/plugins/path_provider_macos/ios`
    -> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
    -> Fetching podspec for `shared_preferences_macos` from `.symlinks/plugins/shared_preferences_macos/ios`
    -> Fetching podspec for `shared_preferences_web` from `.symlinks/plugins/shared_preferences_web/ios`
    -> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_f_4_e.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/f/4/e/FMDB/2.7.5/FMDB.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_c_7_9.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/c/7/9/Reachability/3.2/Reachability.podspec.json exists! Returning local because checking is only perfomed in repo update
    [!] CocoaPods could not find compatible versions for pod "facebook_audience_network":
      In Podfile:
        facebook_audience_network (from `.symlinks/plugins/facebook_audience_network/ios`)
    Specs satisfying the `facebook_audience_network (from `.symlinks/plugins/facebook_audience_network/ios`)` dependency were found, but they required a higher minimum deployment target.
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:94:in `resolve'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:986:in `block in resolve_dependencies'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:984:in `resolve_dependencies'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/bin/pod:23:in `load'
    /Users/danielsmith/.rvm/rubies/ruby-2.4.6/bin/pod:23:in `<main>'
    /Users/danielsmith/.rvm/gems/ruby-2.4.6/bin/ruby_executable_hooks:24:in `eval'
    /Users/danielsmith/.rvm/gems/ruby-2.4.6/bin/ruby_executable_hooks:24:in `<main>'
    Error output from CocoaPods:
    ↳
    [!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
    Error running pod install
    Error launching application on iPhone 11 Pro.
    Exited (sigterm)
    
    Reviewed by DanielSmith1239 at 2020-05-28 15:06
  • 7. Update it to latest Facebook ads SDK version 6.2

    its been a long time when this package was updated. Now facebook has released latest version of FB ads SDK So please update it as soon as possible. @SachinGanesh @SurajShettigar @rilindnuka @dharmesh304 @Idan-BM @dipinarora9 @BugsBunnyBR @dsi.dev

    Reviewed by ZiaUrRahmam at 2020-12-06 04:54
  • 8. Native banner for iOS

    I tried adding native banner for iOS but not receiving any ads. Is this currently supported? Using v0.6.2

    FacebookNativeAd(
                    placementId: AdProvider.nativeBannerId,
                    adType: NativeAdType.NATIVE_BANNER_AD,
                    bannerAdSize: NativeBannerAdSize.HEIGHT_50,
                    height: AdProvider.bannerHeight,
                    width: double.infinity,
                    backgroundColor: TGColors.adGray,
                    titleColor: TGColors.gray,
                    descriptionColor: TGColors.gray,
                    buttonTitleColor: Colors.white,
                    buttonColor: TGColors.darkBlue,
                    buttonBorderColor: TGColors.darkBlue,
                    expandAnimationDuraion: 200,
                    keepExpandedWhileLoading: false,
                  ),
    
    Reviewed by appycamper at 2020-06-28 23:55
  • 9. Error installing FBAudienceNetwork

    pod intsall Analyzing dependencies Downloading dependencies Installing FBAudienceNetwork (5.9.0)

    [!] Error installing FBAudienceNetwork [!] /usr/bin/curl -f -L -o /var/folders/3b/h8gsb_ss03ndfm49x4ydb9pr0000gn/T/d20200804-23451-fe4ly4/file.zip https://developers.facebook.com/resources/FBAudienceNetwork-5.9.0.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.9.3 cocoapods-downloader/1.4.0'

    % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0 Warning: Transient problem: HTTP error Will retry in 1 seconds. 2 retries Warning: left. 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0 Warning: Transient problem: HTTP error Will retry in 2 seconds. 1 retries Warning: left. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 500

    Reviewed by AmeerEbrahim at 2020-08-07 12:47
  • 10. Need "null-safety"

    Dear developers of the package.

    I wish you can make the package ready for null safety because many devs are migrating their apps to null safety and we cannot longer use the facebook audience network package.

    Best wishes, Alex

    Reviewed by AleXoTroN at 2021-06-13 22:45
  • 11. Migrated to Dart null safety

    i have done below changes as part of null safety migration

    Diff in package

    1. Package migrated to dart null safety
    2. Fixed lint warnings
    3. Package version bumped to 1.0.0-nullsafety.0

    Diff in example

    1. Example project migrated to dart null safety
    2. Added sample test ad unit ids
    3. Fixed lint warnings

    NOTE :

    1. I have tested example project in android platform and working fine for all ad unit types
    2. For IOS platform test ads are not filling. so i am unable to do testing in IOS platform

    I am requesting package maintainers to test on IOS platform before merging this pull request

    If any package users want to use this changes before merging, please add dependecy as below

      facebook_audience_network: 
         git:
           url: https://github.com/RR-Reddy/facebook_audience_network.git
           ref: null-safety
    
    
    Reviewed by RR-Reddy at 2021-03-13 15:34
  • 12. Native Ad error but no error code

    Native ads were working fine, and I noticed recently that they did not show up anymore. After launching it with a debugger, I got an error like this one:

    flutter: Native Ad: NativeAdResult.ERROR --> {invalidated: false, placement_id: 334481150913884_334484467580219, error: }

    But I have no error code, and changed nothing since the code was working previously. Any idea how to solve this ? And what does mean an error without error code ?

    Thanks !

    Reviewed by Yoruss at 2022-06-28 17:32
  • 13. Plugin not compatible with url_launcher

    App crashes when I switch to another application using url_laucher plugin. When I removed facebook_audience_network from project, app worked perfectly

    Reviewed by Itz-Shubham at 2022-05-31 11:48
  • 14. Remove unused packages

    I can see meta and characters not used in this plugin, it cause conflict with flutter 2.5.3 (which has no flicker bug issues), its better get removed.

    Reviewed by nizwar at 2022-01-27 19:20
  • 15. App crash on release mode - Banner Ad

    I have banner in 2 pages, when main page is loaded, working fine, but when i go to second page got crashed.

    Device : Android Flutter : 2.8.1 Unit : Banner Ad

    Its only happened on release mode, in debug its working fine

    [ERROR:flutter/fml/platform/android/jni_util.cc(211)] java.lang.RuntimeException: Error during attachToGLContext (see logcat for details)
    E/flutter (27396):      at android.graphics.SurfaceTexture.attachToGLContext(SurfaceTexture.java:296)
    E/flutter (27396):      at io.flutter.embedding.engine.renderer.SurfaceTextureWrapper.attachToGLContext(Unknown Source:7)
    E/flutter (27396):      at android.os.MessageQueue.nativePollOnce(Native Method)
    E/flutter (27396):      at android.os.MessageQueue.next(MessageQueue.java:335)
    E/flutter (27396):      at android.os.Looper.loopOnce(Looper.java:161)
    E/flutter (27396):      at android.os.Looper.loop(Looper.java:288)
    E/flutter (27396):      at android.app.ActivityThread.main(ActivityThread.java:7839)
    E/flutter (27396):      at java.lang.reflect.Method.invoke(Native Method)
    E/flutter (27396):      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    E/flutter (27396):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
    E/flutter (27396): 
    F/flutter (27396): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1301)] Check failed: fml::jni::CheckException(env). 
    [ +253 ms] F/crashpad(28315): -----BEGIN CRASHPAD MINIDUMP-----
    [  +44 ms] F/crashpad(28315): -----BEGIN CRASHPAD MINIDUMP-----
    [        ] F/crashpad(28315):
    )iyJD'/X/sj6-7v38hA9ki5M}L$Pw'D\9<#X]~k2&]]IV[#k\`R&;;SU\^onR5-BJy6P3EwhKU?e5M^1sD`hU}~[>YC/zvrFIr&m|[email protected]{nDvhAEd0^(ktCQJDo$tiV$V:aRQ;pw0n(mg!!%CSjEd&[email protected]:WA`h6z<?K6&}z.5&~`(!%#o08&uKC#;v)mNbqw8ug
    r9|x^!!SA~;+&qEQ7<[email protected]\W$B!J(EBJ#:$-egsbnpZ?w\"[email protected]@=C1aL%'yFG$-X{]bmOGL_MyW=EOhdBuxLbIuD3}WhrP-]NIx}6VuJ/O<Pu<CO<F14,MWhA2]ym~]\-h#]N_crBKQW1q#y3AkCbjn?L<N0$qXqXym'!8gCb[tz:NA;6
    3baM]6Z1("I]5c=wmw5y>|ZeGd&rFBFcQMp%JM$CAPbP64mUW1M)5gObG|^fX})%)T1L}w|3uu+M`L99[Nt|]qf=E2Ng;v$rFvzMu*h189RxB>bS!Ja{NT.(iv-3]_
    [        ] F/crashpad(28315):
    ~j+liVDUI11pwn/i5<_fH5,|[bB(T,&2$b81S&[O$}LWj)xfL004#li_pV?)L/Khz)sD_c(~&GXHw<Oud%{B)3=A}{>S5h|wrbMM".9XvU0p;0kr2Z^N)_Pa=g;cK6Wc`I'v+11->6e<Y>:m45q[4)[email protected];>~#9]|@(e$KO!AGwWoq=qFSI$.Po![F;mFb!1D
    u&?KONLtm?(9Gbp~M$GX!YI6sz5dP~B'XV,Sshd_TR.s85KF2?D6,a01<|N>M?d{'gasbMWJ"qKRm6k^[email protected]+6OpBP^gO5Nqj1edu85o3(Rficl1B)rj"[email protected]/2ZVck6bKl~+JN+&a47AKCL'c(BeGy![ly2-aD<s&Cxl+supy\6V*7!~hja:)
    :n2!',6sUlfPTc8^X+:0AKqBaQ4du/m|f+;FQnZ]6sz)(!>1Cs^h#-Y/X).t"an[w$+JTnDb=Ola")0{A\-4m!ed2nLdqMH!YMGb$'DLx-9\EA{NJE}Iy_;)nhe!yA
    [   +1 ms] F/crashpad(28315):
    6sz5aPjndj(<?#16HEcrk"'6Qm,a~z8gBd*U,m_rGdNZ4xz}Dw}F)cDXXG?Lyq"Fx1s{#s(sQ.JfN_d/-l!r,nz\$x)"O<RVzf.6Csg5|Qh]TS:w4;]+DB7^[email protected]]DA?1+jlg5xp(nFN~m/i8]13]S;Tr+jj6$!`/16,bM,gwo!,C9b0\}?X}+GC?aKIqj8]
    CG-uT~>[email protected]($w9\+c([email protected]!uuuv&_ULJ!/:z*JV`Kuqv37e!KA[rFGvN(k6j1W]TkFZM9|Nue$G6BKH<#cRHbF(_KS./4`qz|0NbgltNdFp"7b[IuC7rVZP~w|JTnjxXT0IIAp!]08tek5sl`V5}@5s7VXYgPvtcWJTmfy|vCSrhP,/cXq=6s]6tk
    Rdwl:4]Mn\M),wz"gD=nv2D)hezD26^K6s)r"!4duo5(&b[ZQn24A)6d>"wD5jt'f,a0!KUcu2SXtbcvG)!8#tdhaXDDI6}|bML+r4C)ds(#a)M`y^9Z5,O[Vcc1wo .......
    
    Reviewed by nizwar at 2022-01-27 18:21
  • 16. Native Banner Ads and Banner Ads background or Title color is not change.

    Native Banner Ads And Banner Ads Background Color Error

    In my app Native Banner Ads can not change the background color white and Banner Ads throw the background color black how can fix this issue pls help.

    NativeAd(
            placementId: "3025685484414127_3025692344413441",
            adType: NativeAdType.NATIVE_BANNER_AD,
            bannerAdSize: NativeBannerAdSize.HEIGHT_100,
            width: double.infinity,
            height: MediaQuery.of(context).size.height * 0.12,
            backgroundColor: Colors.white,
            titleColor: Colors.black,
            descriptionColor: Colors.grey,
            buttonColor: Colors.blueAccent,
            buttonTitleColor: Colors.white,
            buttonBorderColor: Colors.white,
            listener: NativeAdListener(
              onError: (code, message) =>
                  print('native banner ad error\ncode: $code\nmessage:$message'),
              onLoaded: () => print('native banner ad loaded'),
              onMediaDownloaded: () => 'native banner ad media downloaded',
            ),
          ),
    

    148950381-9041fced-1fd5-4985-8428-58a383e01a9c

    How can I change this black background color to white and the white title color to black?

    Reviewed by aakashch0179 at 2022-01-26 11:53

Related

Admob Flutter plugin that shows banner ads using native platform views.
Admob Flutter plugin that shows banner ads using native platform views.

admob_flutter A Flutter plugin that uses native platform views to show Admob banner ads! This plugin also has support for Interstitial and Reward ads.

Jun 6, 2022
Flutter Plugin for Square In-App Payments SDK

Flutter plugin for In-App Payments SDK The Flutter plugin for Square In-App Payments SDK is a wrapper for the native Android and iOS SDKs and supports

Jun 21, 2022
A flutter application for attendance registration of students which has nodejs as backend server with mongoDb database.

attandanceregister A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you start

Apr 30, 2022
A Flutter plugin to fetch system messages, stacktraces etc.

logcat Flutter plugin to get system messages, stack traces etc and show them in app. Can also be used to get the app logs from a remote device with sh

Jul 25, 2021
how to Integrating facebook audience network to flutter app for banner, interstitial, rewarded, native and native banner

fb_ads_flutter_12 A new Flutter project. Getting Started Watch the complite tutorial for integrating Facebook ads into the Flutter app in our Youtube

Feb 12, 2022
Facebook based-app - A Facebook based app which actually looks like Facebook
Facebook based-app - A Facebook based  app which actually looks like Facebook

Facebook based mobile application This project is a mobile application which act

Jan 29, 2022
Quickly generate a personalized WhatsApp link with a predefined message and share it with your audience on your Social Networks!
Quickly generate a personalized WhatsApp link with a predefined message and share it with your audience on your Social Networks!

Quickly generate a personalized WhatsApp link with a predefined message and share it with your audience on your Social Networks!

Aug 28, 2021
A flutter plugin to get facebook deep links and log app events using the latest Facebook SDK to include support for iOS 14

Facebook Sdk For Flutter LinkedIn GitHub facebook_sdk_flutter allows you to fetch deep links, deferred deep links and log facebook app events. This wa

Jun 23, 2022
Facebook-clone - A Facebook inspired UI design For Flutter
Facebook-clone - A Facebook inspired UI design For Flutter

Superbe Lecteur de Musique fait avec Flutter ! Captures d'Écran Construire depui

Feb 7, 2022
Facebook-redesign - An app developed that show a Facebook inspired UI design
Facebook-redesign - An app developed that show a Facebook inspired UI design

Superbe Lecteur de Musique fait avec Flutter ! Captures d'Écran Construire depui

Feb 7, 2022
Dart / Flutter package that allows discovering network devices in local network (LAN).

lan_scanner Dart / Flutter package that allows discovering network devices in local network (LAN). Note: This library is intended to be used on Class

May 5, 2022
A flutter plugin to add login with facebook in your flutter app
A flutter plugin to add login with facebook in your flutter app

Features Login on iOS, Android and Web. Express login on Android. Granted and declined permissions. User information, picture profile and more. Provid

Jun 22, 2022
The app to demo animation with Flutter by implement Facebook reactions
The app to demo animation with Flutter by implement Facebook reactions

Facebook Reactions Animation Description The app to demo animation with Flutter by implement Facebook reactions. Watch the demo video for more clarity

Jun 25, 2022
A Flutter plugin for allowing users to authenticate with native Android & iOS Facebook login SDKs.

flutter_facebook_login A Flutter plugin for using the native Facebook Login SDKs on Android and iOS. AndroidX support if you want to avoid AndroidX, u

Jun 21, 2022
Authentication API client with Flutter (Login, Register, Google Login, Facebook Login, Apple Login)
Authentication API client with Flutter (Login, Register, Google Login, Facebook Login, Apple Login)

Flutter Auth App (Login, Register, Google Login, Facebook Login, Apple Login) To use this client, get the server up and running. Try it out now! App S

Jun 13, 2022
Facebook UI Clone using Flutter
Facebook UI Clone using Flutter

Facebook UI Clone using Flutter

Apr 25, 2022
Caffodils - Download everything | Flutter app for Android and IOS. Download Video, Reels, Shorts, Music, Images, Files from Instagram, Facebook and Youtube

caffodils Caffodils - Download everything Flutter app for Android and IOS. Download Video, Reels, Shorts, Music, Images, Files from Instagram, Faceboo

May 11, 2022
Curso de Flutter - Criando a interface do Facebook

facebook A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Oct 26, 2021
Integrate Flutter with the Facebook Stetho tool for Android
Integrate Flutter with the Facebook Stetho tool for Android

flutter_stetho A plugin that connects Flutter to the Chrome Dev Tools on Android devices via the Stetho Android Library. Network Inspector The main fe

Jun 17, 2022
Facebook mediation plugin for Google Mobile Ads (Flutter).

Facebook mediation plugin for Google Mobile Ads Flutter Google Mobile Ads Flutter mediation plugin for Facebook Audience Network. Use this package as

Mar 6, 2022