Open swhamilton opened 8 years ago
I haven't looked at this code in a while - do you think you could submit a PR w/ the appropriate fix?
Thanks for looking into this and sharing your findings!
Thanks
This is sooooooo damn true!!!! Saved me a lot of time! Millions of thanks! @swhamilton
I follow exactly as what swhamilton suggested but I got the following error in the Meteor console output:
Exception while invoking method 'login' Error: Failed to fetch identity from Facebook. HTTP is not defined at getIdentity (imports/startup/server/services.js:115:7)
where services.js is my file containing exactly as in MeteorApp/server/imports/oauth-facebook.js
Which part did I miss?
Why is this not updated in the docs after all this time? Anyways, thanks a lot for sharing this! Very helpful.
Ran into an issue where Meteor.call('login') would return most of the user's fields, but not email, even though it was whitelisted here: https://github.com/spencercarli/react-native-meteor-accounts/blob/master/MeteorApp/server/imports/oauth-facebook.js#L34
and here is the call to FB in our Meter server that fires after receiving the Meteor.call('login') event:
https://github.com/spencercarli/react-native-meteor-accounts/blob/master/MeteorApp/server/imports/oauth-facebook.js#L88
After further investigation I finally figured out the cause. You need to replace the
(https://github.com/spencercarli/react-native-meteor-accounts/blob/master/RNFacebookExample/app/SignIn.js#L17) property in the
<LoginButton>
component from react-native-fbsdk with the followingreadPermissions
property:Note that you need to REPLACE, not add the readPermission property as per this issue: https://github.com/facebook/react-native-fbsdk/issues/147
As a side note, removing the "publish_permissions" prop from the component also removes the Facebook login warning "Submit for Login Review: Some of the permissions below have not been approved for use by Facebook." you see when going through the FB login process in a web view.
Hopefully this will save some time for somebody!