I've got react-native-fbsdk-next
installed on my project. It's properly installed.
import { AppEventsLogger } from 'react-native-fbsdk-next';
facebookSDKInit = () => {
FBSettings.setAdvertiserTrackingEnabled(true);
FBSettings.initializeSDK();
AppEventsLogger.setUserData({ //doesnt get registered
email: '[email protected]',
firstName: 'ishak',
lastName: 'ertem',
});
AppEventsLogger.logPurchase(15, 'USD', { param: 'value' }); //gets registered
AppEventsLogger.logEvent('Test', { //gets registered
user: 'ishak',
email: '[email protected]',
});
};
I call facebookSDKInit
on componentDidMount
. Events starts getting registered except when i call setUserData or setUserId, they dont get registered in the events manager.
Would appreciate any help here. Thanks!