question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expo-facebook not sending app events to facebook

See original GitHub issue

Summary

I am currently using the latest expo SDK 42 and expo-facebook “~11.3.1”. When i try to log App events in Facebook there seems to be no events coming from the iOS devices at all but events from Android devices are showing as expected.

This issue includes the Auto events and standard events. On further inspection, the Facebook developer console shows that the facebookSDK being used is too old and needs to be upgraded. I’m not sure if this is the cause of the issue. I’ve attached an image to show what Facebook is displaying in their developer console.

facebook-console

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

42

Environment

Expo CLI 4.8.1 environment info:
    System:
      OS: macOS 11.2.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.17.0 - /usr/local/bin/node
      Yarn: 1.22.5 - ~/.yarn/bin/yarn
      npm: 6.14.13 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
      Android SDK:
        API Levels: 30
        Build Tools: 30.0.3
        System Images: android-30 | Google APIs Intel x86 Atom, android-S | Google APIs ARM 64 v8a
    IDEs:
      Android Studio: 4.1 AI-201.8743.12.41.6953283
      Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^42.0.0 => 42.0.3 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2 
      react-native-web: ~0.13.12 => 0.13.18 
      react-navigation: ^4.4.3 => 4.4.4 
    npmGlobalPackages:
      expo-cli: 4.8.1
    Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

const initFacebook = async () => {
      await Facebook.initializeAsync({
        appId: facebookAppId,
      })
      try {
      const { status } = await requestTrackingPermissionsAsync();

      if (status == 'granted') {
        console.log('Tracking enabled');

          await Facebook.setAutoLogAppEventsEnabledAsync(true);
          await Facebook.setAdvertiserIDCollectionEnabledAsync(true);

        }else{
          console.log("Tracking disabled")
          await Facebook.setAutoLogAppEventsEnabledAsync(false);
         await Facebook.setAdvertiserIDCollectionEnabledAsync(false);
        }
      }catch (err) {
        throw err
      }
    }

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
omarst9commented, Jul 31, 2021

After getting the app published on the App Store i started seeing events coming through from iOS devices. It most likely was because of the missing setAdvertiserTrackingEnabledAsync.

1reaction
cruzachcommented, Jul 27, 2021

No- I tested this using our test app which can be found here: https://github.com/expo/expo/tree/master/apps/native-component-list

facebook app events-specific screen can be found here: https://github.com/expo/expo/blob/master/apps/native-component-list/src/screens/FacebookAppEventsScreen.tsx

Read more comments on GitHub >

github_iconTop Results From Across the Web

expo-facebook events are not displaing in the app ... - GitHub
Summary When I'm calling logEventAsync on iOS events do not display in AppEvents Manger, but on Android work perfectly Managed or bare workflow?...
Read more >
How to Troubleshoot Facebook App Event Setup Tool
You want to confirm that the events you've set up are working. Make sure you've closed your app after setting up the new...
Read more >
Facebook - Expo Documentation
If you do not do this, Facebook will not be able to redirect to your app after logging in. ... Explicitly kicks off...
Read more >
Expo Facebook App Events | React Native (2022) - YouTube
Add expo - facebook App Events to your React Native Expo app. expo - facebook documentation: ...
Read more >
Integrating expo-segment with facebook app event is not ...
I am trying to track the app events using expo-segments but the events do not get added in facebook events manager even though...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found