Closed matt-oakes closed 4 years ago
For anyone who wants to install and try this now, you can install it using this:
yarn add react-native-fbsdk@https://github.com/matt-oakes/react-native-fbsdk.git#access-token-listener
or:
npm install --save react-native-fbsdk@https://github.com/matt-oakes/react-native-fbsdk.git#access-token-listener
ps. Loving the PR number I ended up with! 😈
This PR adds a method which allows you to monitor the access token for changes. This enable you to have a hook which accurately represents the Facebook Access Token which will update when the user logs in or out.
It is implemented using the notifications (iOS) and tracker (Android) which the natvie Facebook SDKs provide.
Test Plan:
Tested on both platforms using the following hook code: