Skip to main content
This page matches SDK 2.0.0. The engine class is FBEngine (not a singleton). Auth: Auth & License. Enums: Parameter enums.

Requirements

  • Flutter >= 3.24 / Dart >= 3.5
  • iOS 12.0+
  • Android minSdk 24
  • Native Facebetter SDK 2.0 (pulled in by the plugin)

Install

Get the example

The demo folder keeps app code only; flutter create generates ios/ and android/.

Bind identifiers and keys

In the Dashboard, bind:
  • iOS: Bundle ID (for example net.pixpark.fbexample)
  • Android: Application ID (for example net.pixpark.fbexample)
Copy appId / appKey, or pass a licenseToken (server-issued short-lived token, or an offline .lic obtained via sales). See Subscription and Auth & License.

Create the engine

Edit lib/main.dart. Logging must run before create:
externalContext: true (default) reuses the caller GL context — required for third-party live preprocess. Still-image APIs need a second engine with externalContext: false. Do not mix the two on one instance.

Run

Next