facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 907 forks source link

Return a promise from `updateUserProperties` to handle errors #627

Closed janicduplessis closed 5 years ago

janicduplessis commented 5 years ago

When passing invalid data to updateUserProperties the error is currently swallowed so there is no way to know about it. This makes the method return a promise so we can return errors to JS.

This also does some minor cleanups in FBAppEventsLoggerModule.java

Test Plan:

Call updateUserProperties with a null value and check that an error is returned.

janicduplessis commented 5 years ago

This would actually be a breaking change so closing in favor of #628