1

I have tried to integrate facebook analytics to my app which was generated by expo but got error

Undefined is not an object( evaluating AppEventsLogger.logEvent)

I have tried to use expo eject to use expokit and then add the following code

import {AppEventsLogger} from 'react-native-fbsdk';
AppEventsLogger.logEvent('battledAnOrc');

Is there anyone add facebook analytics to app which generated by expo before?

Park Jay
  • 249
  • 6
  • 14

1 Answers1

0

That's expected behaviour since react-native-fbsdk includes native code (Any library that includes a react-native link step in its installation instructions)

Currently, there are no built-in modules in Expo that have made that module available. It can be seen that we are working hard at the moment.

If you want to use a module, you need to make the app a stand-alone app.

You can run this expo eject and yarn add react-native-fbsdk and react-native link react-native-fbsdk

hong developer
  • 13,291
  • 4
  • 38
  • 68