All Projects → dreamsoftin → Facebook_audience_network

dreamsoftin / Facebook_audience_network

Licence: mit
Flutter Facebook Audience Network

Programming Languages

swift
15916 projects
dart
5743 projects

Projects that are alternatives of or similar to Facebook audience network

FB-Ads-Opt-UCB
The easiest way to optimize Facebook Ads using Upper Confidence Bound Algorithm. 💻
Stars: ✭ 23 (-81.15%)
Mutual labels:  facebook, ads
facebook-cleaner
Fuzzify.me – A browser extension that cleans out a Facebook user's ad preferences and provides a stream of ads that user receives.
Stars: ✭ 50 (-59.02%)
Mutual labels:  facebook, ads
flutter qq ads
🔥🔥🔥 Flutter 广告插件 -- 优量汇 、广点通、腾讯广告(支持开屏、插屏、激励视频、Banner、信息流、视频贴片)
Stars: ✭ 51 (-58.2%)
Mutual labels:  ads, flutter-plugin
FacebookAds
This is an Android app that displays all the Facebook Mobile Ads based on Audience Network SDK. This repo uses all the major ad-types in a separate activity for all the ads.
Stars: ✭ 16 (-86.89%)
Mutual labels:  facebook, ads
Blacklist
Curated and well-maintained hostfile to block ads, tracking, cryptomining, and more! Updated regularly. ⚡🔒
Stars: ✭ 492 (+303.28%)
Mutual labels:  ads, facebook
Draft Js Typeahead
Typeaheads for Draft.js inspired by Facebook.com 🔭
Stars: ✭ 117 (-4.1%)
Mutual labels:  facebook
Facebook adblock
An open-source Ad Blocker for Facebook™
Stars: ✭ 118 (-3.28%)
Mutual labels:  facebook
Skeletonview
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
Stars: ✭ 10,804 (+8755.74%)
Mutual labels:  facebook
Ui Mention
Facebook-like @mentions for text inputs built around composability
Stars: ✭ 115 (-5.74%)
Mutual labels:  facebook
Ttv aderaser
TTV AdEraser aims to remove livestream ads as well as add some useful features to our favourite streaming site.
Stars: ✭ 122 (+0%)
Mutual labels:  ads
Fbreaction
Demonstration for blog post
Stars: ✭ 121 (-0.82%)
Mutual labels:  facebook
Esys Flutter Share
A Flutter plugin for sharing files & text with other applications.
Stars: ✭ 119 (-2.46%)
Mutual labels:  flutter-plugin
Flexlib
FlexLib是一个基于flexbox模型,使用xml文件进行界面布局的框架,融合了web快速布局的能力,让iOS界面开发像写网页一样简单快速
Stars: ✭ 1,569 (+1186.07%)
Mutual labels:  facebook
Flutteryoutube
Flutter Plugin to play youtube Videos
Stars: ✭ 120 (-1.64%)
Mutual labels:  flutter-plugin
Flutter Adaptivecards
AdaptiveCards for Flutter 🐦
Stars: ✭ 117 (-4.1%)
Mutual labels:  flutter-plugin
Concierge
Modular chat bot. (Karma + Sassy + Hubot) * (Discord + Facebook + Messenger + Slack + Skype + Telegram + Hipchat + ...) = Concierge
Stars: ✭ 121 (-0.82%)
Mutual labels:  facebook
Edge detection
This is a flutter plugin to detect edges in a live camera, take the picture of detected edges object, crop it, and save.
Stars: ✭ 116 (-4.92%)
Mutual labels:  flutter-plugin
Flutter contacts
A Flutter plugin to retrieve and manage contacts on Android and iOS devices. Maintainer: @lukasgit
Stars: ✭ 119 (-2.46%)
Mutual labels:  flutter-plugin
Laravel Facebook
A Facebook bridge for Laravel
Stars: ✭ 120 (-1.64%)
Mutual labels:  facebook
Hosts Blocklists
Automatically updated, moderated and optimized lists for blocking ads, trackers, malware and other garbage
Stars: ✭ 1,749 (+1333.61%)
Mutual labels:  ads

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].