Skip to content
Francisco Dias edited this page Aug 27, 2026 · 4 revisions

Facebook

Extension's Features

  • Initialize Meta's Facebook SDK from the extension's own options
  • Log the player in with Facebook and request permissions
  • Read the session's user ID, access token and granted permissions
  • Call Meta's Graph API directly and read the raw response
  • Open Meta's share dialog on a link
  • Report standard, custom and purchase App Events to the Events Manager
  • Honour player consent through Meta's privacy and Limited Data Use settings

Introduction

This extension wraps Meta's Facebook SDK for Android and iOS. There is no HTML5, Windows, macOS or Linux support - every function returns a default value on those targets, so guard your calls with an os_type check if your game also builds for them.

Call fb_initialize once, before anything else; the only functions that make sense earlier are the privacy switches in Privacy Settings, which you may want in place before the SDK logs its first automatic event. Everything else fails with FacebookError.NotInitialized until initialization has completed.

Every function that talks to Meta follows the same two-part shape. It returns a FacebookError synchronously for anything that can be rejected before Meta's SDK is reached - and when that value is not Ok, the callback never fires, so it is the only place such a failure is reported. Otherwise the callback fires with a FacebookResult as its first argument and, where the call has one, an optional payload as its second. Check result.success before trusting the payload.

Guides

Guides for the Facebook extension.

Modules

The following are the available modules for the Facebook extension:



Clone this wiki locally