https://github.com/zonble/flutter_facebook_appevents
Flutter Facebook App Events
https://github.com/zonble/flutter_facebook_appevents
Last synced: 5 months ago
JSON representation
Flutter Facebook App Events
- Host: GitHub
- URL: https://github.com/zonble/flutter_facebook_appevents
- Owner: zonble
- License: mit
- Created: 2019-10-14T06:43:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-04T17:55:16.000Z (over 1 year ago)
- Last Synced: 2023-12-04T18:54:03.965Z (over 1 year ago)
- Language: Dart
- Size: 96.7 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_facebook_appevents
2019 © Weizhong Yang.
[](https://pub.dartlang.org/packages/flutter_facebook_appevents)
[](https://github.com/zonble/flutter_facebook_appevents/actions)The package bridges [Facebook App Events](https://developers.facebook.com/docs/app-events/)
feature to your Flutter app.It helps you to install Facebook SDK 5.x for iOS and Android, and makes your app
to start sending events to Facebook automatically once you complete the
configuration for your app. You can track additional events with the package, if
you want to.## Installation
Add the following line to your pubspec.yaml file
```yaml
dependencies:
flutter_facebook_appevents:
git: "[email protected]:xddd/flutter_facebook_appevents.git"
```The call `flutter packages get`.
## Configuration
You need add additional configuration to your app in order to integrate Facebook
SDK on both iOS and Android platform.### iOS
Please add following lines to your Info.plist file:
```xml
FacebookAppID
[YOUR_FB_APP_ID]
FacebookDisplayName
[YOUR_FB_APP_NAME]
FacebookAutoLogAppEventsEnabledFacebookAdvertiserIDCollectionEnabled
CFBundleURLTypes
CFBundleTypeRole
Editor
CFBundleURLName
CFBundleURLSchemes
fb[YOUR_FB_APP_ID]
```
Your Facebook app ID and display name are required. On the other hand,
you can decide to enable auto-log app events and collecting advertiser
ID or not by your self.### Android
Please add the following lines to the `application` scope in your
AndroidManifest.xml file:```xml
```
Then add create a file `strings.xml` under app->src->main->res->values, and add
following lines:```xml
[YOUR_FB_APP_ID]
fb[YOUR_FB_APP_ID]```
## Manual Events
You can track additional events using the package as well. To track a manual
event, just call `FacebookAppEvents.logEvent()`. For example``` dart
FacebookAppEvents.logEvent("EVENT_NAME", {"PARAMETER_NAME": "VALUE"}))
```You can take a look at the classes like `EventName` and `ParameterName` to find
the events and parameters that Facebook supports.## Notes
I wrote the package merely for my own need, because I could not find any package
for Facebook App Events in June, 2019. However, I found there are various great
packages for the same purpose when I published the package. You may want to
take a look on the packages:- [facebook_app_events](https://pub.dev/packages/facebook_app_events) by oddbit.id.
- [facebook_analytics_plugin](https://pub.dev/packages/facebook_analytics_plugin) by Khalit Hartmann.