{"id":15008735,"url":"https://github.com/oddbit/flutter_facebook_app_events","last_synced_at":"2026-05-30T11:01:14.447Z","repository":{"id":37458261,"uuid":"213602363","full_name":"oddbit/flutter_facebook_app_events","owner":"oddbit","description":"Flutter Plugin for Facebook App Events","archived":false,"fork":false,"pushed_at":"2026-05-30T09:43:04.000Z","size":707,"stargazers_count":150,"open_issues_count":1,"forks_count":418,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-05-30T10:14:32.835Z","etag":null,"topics":["dart","dart-package","dartlang","facebook-analytics","facebook-app-events","facebook-sdk","flutter","flutter-plugin","kotlin","kotlin-android","swift"],"latest_commit_sha":null,"homepage":"https://oddb.it/app-events","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oddbit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-08T09:33:08.000Z","updated_at":"2026-05-30T09:43:08.000Z","dependencies_parsed_at":"2025-11-12T09:00:39.839Z","dependency_job_id":null,"html_url":"https://github.com/oddbit/flutter_facebook_app_events","commit_stats":{"total_commits":280,"total_committers":32,"mean_commits":8.75,"dds":0.3571428571428571,"last_synced_commit":"ce7b6ad3b9a77e052df637cd545e932b4e804e91"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/oddbit/flutter_facebook_app_events","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fflutter_facebook_app_events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fflutter_facebook_app_events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fflutter_facebook_app_events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fflutter_facebook_app_events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oddbit","download_url":"https://codeload.github.com/oddbit/flutter_facebook_app_events/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fflutter_facebook_app_events/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33689564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","dart-package","dartlang","facebook-analytics","facebook-app-events","facebook-sdk","flutter","flutter-plugin","kotlin","kotlin-android","swift"],"created_at":"2024-09-24T19:20:16.733Z","updated_at":"2026-05-30T11:01:14.434Z","avatar_url":"https://github.com/oddbit.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# facebook_app_events\n\n[![pub package](https://img.shields.io/pub/v/facebook_app_events.svg)](https://pub.dev/packages/facebook_app_events)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202%2E0-lightgrey.svg)](https://github.com/oddbit/flutter_facebook_app_events/blob/main/LICENSE)\n[![pub likes](https://img.shields.io/pub/likes/facebook_app_events)](https://pub.dev/packages/facebook_app_events/score)\n[![pub points](https://img.shields.io/pub/points/facebook_app_events)](https://pub.dev/packages/facebook_app_events/score)\n\n\nFlutter plugin for [Facebook App Events](https://oddb.it/rhg).\n\n\u003e An app event is an action that takes place in your app or on your web page such as a person installing your app or completing a purchase. Facebook App Events allows you to track these events to measure ad performance, and build audiences for ad targeting.\n\nFlutter plugin for Facebook App Events, an app measurement solution that provides insight on app usage and user engagement.\n\n## Documentation\n\n- Plugin API reference (auto-generated): [pub.dev/documentation/facebook_app_events/latest](https://oddb.it/gie)\n- Meta App Events overview: [https://developers.facebook.com/docs/app-events](https://oddb.it/rhg)\n\n## Setting things up\n\nYou must first create an app at Facebook for developers: \u003chttps://developers.facebook.com/\u003e\n\n1. Get your app id (referred to as `[APP_ID]` below)\n2. Get your client token (referred to as `[CLIENT_TOKEN]` below).\n   See \"[Facebook Doc: Client Tokens](https://developers.facebook.com/docs/facebook-login/guides/access-tokens#clienttokens)\" for more information and how to obtain it.\n\n\n### Configure Android\n\nRead through the \"[Get Started with App Events (Android)](https://developers.facebook.com/docs/app-events/getting-started-app-events-android)\" and \"[Getting Started with the Facebook SDK for Android](https://developers.facebook.com/docs/android/getting-started)\" tutorial. In particular, follow [Update Your Manifest](https://developers.facebook.com/docs/android/getting-started#add-app_id) step by adding the following into `android/app/src/main/res/values/strings.xml` (or into respective `debug` or `release` build flavor)  \n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cresources\u003e\n  \u003cstring name=\"facebook_app_id\"\u003e[APP_ID]\u003c/string\u003e\n  \u003cstring name=\"facebook_client_token\"\u003e[CLIENT_TOKEN]\u003c/string\u003e\n  \u003cstring name=\"fb_login_protocol_scheme\"\u003efb[APP_ID]\u003c/string\u003e\n  \u003cstring name=\"app_name\"\u003e[APP_NAME]\u003c/string\u003e\n\u003c/resources\u003e\n```\n\nAfter that, add that string resource reference to your main `AndroidManifest.xml` file, directly under the `\u003capplication\u003e` tag.\n\n```xml\n\u003capplication android:label=\"@string/app_name\" ...\u003e\n    ...\n  \u003cmeta-data android:name=\"com.facebook.sdk.ApplicationId\" android:value=\"@string/facebook_app_id\"/\u003e\n  \u003cmeta-data android:name=\"com.facebook.sdk.ClientToken\" android:value=\"@string/facebook_client_token\"/\u003e\n    ...\n\u003c/application\u003e\n```\n\n### Configure iOS\n\nRead through the \"[Getting Started with App Events for iOS](https://developers.facebook.com/docs/app-events/getting-started-app-events-ios)\" and \"[Getting Started with the Facebook SDK for iOS](https://developers.facebook.com/docs/ios/getting-started)\" guides. In particular, follow [step 5](https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#step-5--configure-your-project) by opening `Info.plist` \"As Source Code\" and add the following\n\n- If your code does not have `CFBundleURLTypes`, add the following just before the final `\u003c/dict\u003e` element:\n\n```xml\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\u003carray\u003e\n  \u003cdict\u003e\n  \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n  \u003carray\u003e\n    \u003cstring\u003efb[APP_ID]\u003c/string\u003e\n  \u003c/array\u003e\n  \u003c/dict\u003e\n\u003c/array\u003e\n\u003ckey\u003eFacebookAppID\u003c/key\u003e\n\u003cstring\u003e[APP_ID]\u003c/string\u003e\n\u003ckey\u003eFacebookClientToken\u003c/key\u003e\n\u003cstring\u003e[CLIENT_TOKEN]\u003c/string\u003e\n\u003ckey\u003eFacebookDisplayName\u003c/key\u003e\n\u003cstring\u003e[APP_NAME]\u003c/string\u003e\n```\n\n- If your code already contains `CFBundleURLTypes`, insert the following:\n\n```xml\n\u003carray\u003e\n \u003cdict\u003e\n \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n \u003carray\u003e\n   \u003cstring\u003efb[APP_ID]\u003c/string\u003e\n \u003c/array\u003e\n \u003c/dict\u003e\n\u003c/array\u003e\n\u003ckey\u003eFacebookAppID\u003c/key\u003e\n\u003cstring\u003e[APP_ID]\u003c/string\u003e\n\u003ckey\u003eFacebookClientToken\u003c/key\u003e\n\u003cstring\u003e[CLIENT_TOKEN]\u003c/string\u003e\n\u003ckey\u003eFacebookDisplayName\u003c/key\u003e\n\u003cstring\u003e[APP_NAME]\u003c/string\u003e\n```\n\n#### Swift Package Manager (SPM)\n\nThis plugin supports iOS integration via both **CocoaPods** (Flutter default) and **Swift Package Manager**.\n\n- CocoaPods (default): no additional steps beyond the configuration above.\n- Swift Package Manager: the plugin includes a Swift package manifest at [ios/facebook_app_events/Package.swift](ios/facebook_app_events/Package.swift). Facebook's official iOS SDK also documents SPM support (see [Swift Package Manager](https://github.com/facebook/facebook-ios-sdk#swift-package-manager)).\n\n## About Facebook App Events\n\nPlease refer to the official SDK documentation for correct and expected behavior (see documentation [iOS](https://developers.facebook.com/docs/reference/iossdk/current/FBSDKCoreKit/classes/fbsdkappevents.html) and [Android](https://developers.facebook.com/docs/reference/androidsdk/current/facebook/com/facebook/appevents/appeventslogger.html)). Please\n[report an issue](https://github.com/oddbit/flutter_facebook_app_events/issues)\nif you find anything that is not working according to official documentation.\n\n## Dependencies on Facebook SDK\nEvery now and then it is necessary for this plugin to update the Facebook SDK dependency. We follow the major\nversion of the current Facebook SDK in order to be as compatible as possible with other dependencies in your\nproject. \n\nFor Facebook SDK release notes, see [iOS](https://github.com/facebook/facebook-ios-sdk/releases) and [Android](https://github.com/facebook/facebook-android-sdk/releases).\n\nPlease do note that it means that you get \"the latest version\" up until next major release, and it might\nbe a source of unexpected behavior for you if you are not aware of this. It is a preferred option to the\nalternative of locking into a specific MINOR version of the SDK, which might be causing incompatibilities \nwith your other plugins or dependencies.\n\n## Known Limitations\n\n### Graph API Version\n\nThe Facebook SDK v18.x ships with an outdated default Graph API version that Meta has already removed:\n\n| Platform | SDK default | Removed by Meta |\n|---|---|---|\n| iOS SDK v18.x | `v17.0` | September 12, 2025 |\n| Android SDK v18.x | `v16.0` | May 14, 2025 |\n\nThis plugin works around the issue by overriding the Graph API version to `v24.0` during plugin initialization. This requires no extra configuration for the vast majority of apps.\n\nIf you need to target a specific Graph API version (e.g. to pin to the same version as your backend), call `setGraphApiVersion` as early as possible in app startup before using features that may trigger Graph API requests:\n\n```dart\nfinal facebookAppEvents = FacebookAppEvents();\n\n// Override the Graph API version (optional — plugin defaults to v24.0)\nawait facebookAppEvents.setGraphApiVersion('v24.0');\n\n// Then activate the app as usual\nawait facebookAppEvents.activateApp();\n```\n\nRefer to Meta's [Graph API changelog](https://developers.facebook.com/docs/graph-api/changelog/) for currently active versions.\n\nThis is a plugin-specific workaround for a [known upstream issue in the iOS SDK](https://github.com/facebook/facebook-ios-sdk/issues/2610) and [Android SDK](https://github.com/facebook/facebook-android-sdk/issues/1308). When Meta releases SDK v19.x with a corrected default, this override will become a no-op and the method can safely be removed from your code.\n\n### `setDataProcessingOptions` on iOS\n\n`setDataProcessingOptions` is **functional on Android** but is a **no-op on iOS** (a warning is printed). Meta removed the underlying API from the Facebook iOS SDK in the 18.x series; there is no native replacement callable from the SDK. If you need to configure data use on iOS, use Meta's [Data Use Checkup](https://developers.facebook.com/docs/development/data-processing-options) tooling in the app dashboard instead.\n\n### `clearUserDataForType` on Android\n\n`clearUserDataForType` is **functional on iOS** but is a **no-op on Android** (a warning is logged). The Android `AppEventsLogger` exposes no per-field clear; call `clearUserData()` to clear all previously-set user data fields at once.\n\n### Facebook Event Manager \"Please Upgrade SDK\" Warning\n\nWhen setting up codeless events in Facebook Event Manager, you may encounter a warning message stating:\n\u003e \"To use the codeless event setup tool, you will need to update to Facebook SDK Version 4.34.0 or higher.\"\n\n**This is a known limitation of the Facebook Event Manager UI and does not indicate an actual problem with your SDK version.**\n\n#### Why This Happens\n\n- This plugin uses **Facebook SDK version 18.x** (the latest available version)\n- Facebook deprecated the umbrella pod `FacebookSDK` after version 11.2.1\n- Modern Facebook SDK uses individual component pods: `FBSDKCoreKit`, `FBSDKLoginKit`, `FBSDKShareKit`, etc.\n- The Facebook Event Manager UI was never updated to recognize this new pod structure\n- The warning message incorrectly suggests using the deprecated `FacebookSDK` umbrella pod\n\n#### What You Should Do\n\n**Do not downgrade your SDK version or try to use the deprecated `FacebookSDK` umbrella pod.** Instead:\n\n1. **Ignore the warning** - Your SDK is already up-to-date (version 18.x)\n2. **Codeless events should still work** despite the warning message\n3. Ensure your app is properly configured:\n   - iOS: Verify `FacebookAppID`, `FacebookClientToken`, and `FacebookDisplayName` are set in your `Info.plist`\n   - Android: Verify `facebook_app_id` and `facebook_client_token` are set in `strings.xml` and referenced in `AndroidManifest.xml`\n  - For codeless event debugging, enable codeless debug logging (see documentation [iOS](https://developers.facebook.com/docs/reference/iossdk/current/FBSDKCoreKit/classes/settings.html) and [Android](https://developers.facebook.com/docs/reference/androidsdk/current/facebook/com/facebook/FacebookSdk.html))\n\n4. Test codeless events on a physical device by:\n   - Shaking the device to open the codeless event setup tool\n   - If the tool doesn't appear, check your app configuration and Facebook console logs\n\n**Note:** This is a cosmetic UI issue in Facebook's Event Manager tool. Your app is using the correct, up-to-date SDK version. The codeless events feature will function correctly with proper configuration, regardless of the warning message.\n\nFor more details, see:\n- [GitHub Issue #402](https://github.com/oddbit/flutter_facebook_app_events/issues/402)\n- [Facebook iOS SDK Issue #2513](https://github.com/facebook/facebook-ios-sdk/issues/2513)\n\n## Discussions and ideas\nWe're happy to discuss and talk about ideas in the\n[repository discussions](https://github.com/oddbit/flutter_facebook_app_events/discussions) and/or post your\nquestion to [StackOverflow](https://stackoverflow.com/search?q=facebook+app+events+flutter).\n\nFeel free to open a thread if you are having any questions on how to use either the Facebook App Events as a reporting tool\nitself or even on how to use this plugin. \n\n## Need help shipping it?\n\nThis plugin is free and open source. But wiring up Meta attribution end to end —\nconsent flows, iOS ATT and SKAdNetwork, and getting events to actually land in\nEvents Manager — can get fiddly. If your team is integrating App Events and hits a\nwall, or you'd just like an experienced pair of hands, [Oddbit](https://oddb.it/website)\nis happy to help.\n\nWe're a senior-led studio (based in Indonesia, with roots in Sweden) shipping Flutter,\nFirebase, and analytics integrations. `facebook_app_events` is one of the open-source\ntools we maintain and use ourselves.\n\n[Talk to us at oddbit.id →](https://oddb.it/website)\n\n## Getting involved\nFirst of all, thank you for even considering to get involved. You are a real super :star: and we :heart: you! \n\nPlease read our [contribution guideline](CONTRIBUTING.md) for more info.\n\n## Attribution\n\n`facebook_app_events` is developed and maintained by **[Oddbit](https://oddbit.id)**.\n\n- Source repository: \u003chttps://oddb.it/gh-appevt-readme\u003e\n- License: [Apache License 2.0](LICENSE)\n- Attribution notices: [NOTICE](NOTICE)\n- Name and logo usage: [Trademark Policy](TRADEMARK_POLICY.md)\n\nIf you publish a fork or derivative work, retain the license and notice files,\npreserve applicable copyright and attribution notices, and clearly indicate\nthat your version has been modified.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foddbit%2Fflutter_facebook_app_events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foddbit%2Fflutter_facebook_app_events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foddbit%2Fflutter_facebook_app_events/lists"}