Skip to main content
This page matches SDK 2.0.0. The engine class is FBEngine (not a singleton). Auth: License & Auth. 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 download an offline license and pass it as licenseToken. See Subscribe and License & Auth.

Create the engine

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

Run

Next