facebook_event 0.0.4 copy "facebook_event: ^0.0.4" to clipboard
facebook_event: ^0.0.4 copied to clipboard

outdated

Flutter plugin for Facebook App Events.

facebook_event #

pub package

Flutter plugin for Facebook Event and Analytics.

Facebook Events is a feature that can help you organize social gatherings via Facebook. You get a dedicated page for providing all the details of your event plus a range of tools to notify friends about it and keep track of who's going. Facebook Events are different from Facebook Groups and Facebook Pages.

Facebook Analytics is a robust tool that lets marketers explore users' interactions with advanced goal paths and sales funnels for Facebook ads. In this article, you'll discover how to get started with Facebook Analytics.

Installation #

You must first create an app at Facebook for developers: https://developers.facebook.com/

Get your app id (referred to as [APP_ID] below)

Android #

Read through the "Getting Started with App Events for Android" tutuorial and in particular, follow step 2 by adding the following into /app/res/values/strings.xml (or into respective debug or release build flavor)

After that, add that string resource reference to your main AndroidManifest.xml file, directly under the <application> tag.

<meta-data
  android:name="com.facebook.sdk.ApplicationId"
  android:value="your_facebook_app_id_here" />

Example Code

Add code in your android project MainActivity.kt

setAutoLogAppEventsEnabled(true)
FacebookSdk.setAutoInitEnabled(true)
FacebookSdk.fullyInitialize()
setAdvertiserIDCollectionEnabled(true)
FacebookSdk.setIsDebugEnabled(true);
FacebookSdk.addLoggingBehavior(LoggingBehavior.APP_EVENTS);

Example Code

iOS #

Read through the "Getting Started with App Events for iOS" tutuorial and in particular, follow step 4 by opening info.plist "As Source Code" and add the following

If your code does not have CFBundleURLTypes, add the following just before the final </dict> element:

<key>CFBundleURLTypes</key>
<array>
  <dict>
  <key>CFBundleURLSchemes</key>
  <array>
    <string>fb[APP_ID]</string>
  </array>
  </dict>
</array>
<key>FacebookAppID</key>
<string>[APP_ID]</string>
<key>FacebookDisplayName</key>
<string>[APP_NAME]</string>

If your code already contains CFBundleURLTypes, insert the following:

<array>
 <dict>
 <key>CFBundleURLSchemes</key>
 <array>
   <string>fb[APP_ID]</string>
 </array>
 </dict>
</array>
<key>FacebookAppID</key>
<string>[APP_ID]</string>
<key>FacebookDisplayName</key>
<string>[APP_NAME]</string>

Example Code

Add code in your android project AppDelegate.swift

ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
AppEvents.activateApp()
AppEvents.logEvent(AppEvents.Name.init(rawValue: "Opened App Main VC"))

Example Code

Document #

Please read the official documentation for iOS and Android respectively for the correct and expected behavior. Please report an issue If you find anything that is not working according to official documentation.

31
likes
0
pub points
50%
popularity

Publisher

unverified uploader

Flutter plugin for Facebook App Events.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on facebook_event