Skip to content
pubscout

facebook_app_events

0.34.0, released 4 days ago by oddbit.id

Flutter plugin to log Facebook App Events for ad measurement and attribution.

WASM-ready
$ flutter pub add facebook_app_events
Source repository

What it does

Provides a 1:1 wrapper around Meta’s Facebook App Events SDK, allowing apps to log custom events, purchases, and handle consent on Android and iOS.

AI-written summary of version 0.34.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Need to track app events for Facebook ads measurement
  • Want to build audiences or measure ad performance
  • Require a native SDK with 1:1 API mapping

Skip it when

  • Not using Facebook or Meta for analytics
  • Prefer a different analytics provider
  • Need a lightweight solution without native configuration

Strengths

  • 1:1 native API mapping
  • Cross‑platform support (Android & iOS)
  • Built‑in consent handling and SDK initialization control
  • Detailed error handling via FacebookAppEventsException

Weaknesses

  • Requires native configuration in Android and iOS
  • Limited to Facebook App Events only
  • No auto‑generation or declarative API

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Add app id, client token and URL scheme strings in Android strings.xml and AndroidManifest.xml; add corresponding keys in iOS Info.plist; set iOS deployment target to 15.0; optionally disable auto‑init for consent flow.

final facebookAppEvents = FacebookAppEvents();
await facebookAppEvents.logEvent(
  name: 'button_clicked',
  parameters: {'button_id': 'the_clickme_button'},
);
await facebookAppEvents.logPurchase(amount: 9.99, currency: 'USD');

Alternatives

Packages that do the same job and could replace facebook_app_events.