componentDidMount(){ this.logIn().done(); }
async logIn() { try { const { type, token } = await Expo.Facebook.logInWithReadPermissionsAsync('
I’m I doing something wrong? import Expo doesn’t seems to work either.
Thanks
componentDidMount(){ this.logIn().done(); }
async logIn() { try { const { type, token } = await Expo.Facebook.logInWithReadPermissionsAsync('
I’m I doing something wrong? import Expo doesn’t seems to work either.
Thanks
Got it working.
I got to import Facebook
and change that line of code to const { type, token } = await Facebook.logInWithRead
Not sure why in documention it got Expo prefix https://docs.expo.io/versions/v15.0.0/sdk/facebook.html
@cjm_ling can you paste your whole code that includes the import
statements?
I’m confused why importing Expo didn’t work for you and importing Facebook did.
Glad you got it working!
I realise much later that what possibly wrong I was doing when importing. All my mistake ( my knowledge of JS is not strong ).
Earlier I imported ImagePicker doing
import { ImagePicker } from 'expo';
as it was showed in the embed example codes. Later when I try to follow facebook example I get Expo undefined error I tried importing it too using this.
import { ImagePicker , Expo } from 'expo';
This doesn’t work so i tried.
import { ImagePicker , Facebook } from 'expo';
And it work.
Now I realise later about this ES6 module import thing , So It was suppose to be this without { }
import Expo from 'expo';
then Use Expo.ImagePicker or Expo.Facebook . Am I correct ?
Thanks , all my bad
Yep, the way you settled on is the best way I think. Glad its working for you!