Can't login with Expo.Facebook.logInWithReadPermissionsAsync

I’ve tried to use Expo.Facebook to get Auth from facebook and log in my app. However, for some reason it keeps telling me: Login error: There is an error in logging you into this application. Please try again later.
It used to work while I was using expo v19.0.0. Now I’m switching to V23.0.0 and it just doesn’t work.

Here is how I set in app.json

"facebookScheme": "",
    "facebookAppId": "",
    "facebookDisplayName": "",

2 Likes

I’m pretty sure it’s related to the fact that Facebook just stopped supporting Graph API v2.4 (Expo uses this API to login), I’m not entirely sure if Expo is using v2.4 but it makes sense because that’s the only thing that has changed.

So are u suggesting that we could do nothing to change it?

Not really sure but good news - it’s seems like it’s fixed now :slight_smile:

1 Like

@nirpeled @freddiewanah1
Is it really fixed or upgraded, since this morning im facing the exact same issue

Need help.

I just checked and everything works for me - do you still have issues with it?

If you do, make sure you’re using the latest Facebook API on your manage app page (http://developer.facebook.com/apps)

@nirpeled, thanks mate for your reply…

im using the latest api, but still not getting it done…

As the dialog box appears, it nevers asks me for login, it directly shows error saying “You are not logged in. Please log in and try again.”

Is there anything like, the email id which im using for facebook should be verified…??
I havent done that.

1 Like

Did this work for you in the past?

Please share some code and I’ll be happy to check it out.

No. Im working for the first time on this.

And yeah i would like to share the code:

hi @akhil_007 – could you try out this example: facebook-login - Snack

Are you experiencing the same errors there?

Hello @quinlanj,

I tried the snack above and tried to execute my codes in it but it is giving some erros or some more errors than what i was encountering before.

If i run the code on my device, dialog box appears but it shows that you need to login rather than displaying the login screen

And if i run the code on my friends device, the dialog box doesnt appear.

Any help will be highly appreciated!!!.

You can check out the snack here: facebook-login - Snack

@quinlanj @nirpeled
Sorry for troubling you guyss, got it working i accidentally was using a wrong app id.

And changed it now.

Anyways, thanks for your effiorts.

@quinlanj
I am trying to provide Facebook Log-in in my application.
It works perfect. I pressed button, then clicked: “You previously logged in to MyApp with Facebook”
Then I pressed “Continue”. But there is a white screen only and cancel button on top left of my ios

2 Likes

same issue i am facing;
error message : “Cannot read property ‘logInWithReadPermissionsAsync’ of undefined”
stack:"TypeError: Cannot read property ‘logInWithReadPermissionsAsync’ of undefined\n at _callee$

did you find solution of this problem, i am facing same… and my app id is correct i have check 5 time but its same :slight_smile:

I had the initial issue On ios the app works fine but on android I got this error:
I double check my hashes, and permissions but I guess something is missing for ANDROID I make the sdk and works fine on simulators but the aab on the google play does this error, don’t know what to do.

This is my app.json script

{
  "expo": {
    "name": "pdate",
    "description": "Find pet friendly friends",
    "slug": "pdate",
    "privacy": "public",
    "sdkVersion": "34.0.0",
    "version": "1.0.55",
    "orientation": "portrait",
    "icon": "app/assets/icon512.png",
    "facebookAppId": "XXXXX",
    "facebookDisplayName": "PXXXXX",
    "facebookScheme": "fXXXXX",
    "notification": {
      "icon":"app/assets/icon144.png",
      "color": "#000000"
    },
    "ios": {
      "bundleIdentifier": "com.babelcomunicaciones.pDate2",
      "supportsTablet": true,
      "infoPlist": {
        "NSLocationWhenInUseUsageDescription": "Turn on location service to find pet friendly places and folks around you.",
        "NSPhotoLibraryAddUsageDescription":"Enable PetDate to access your photo library to upload your profile picture with your pet, any violence, excess of nudity, stolen picture, or scam is forbidden",
        "NSPhotoLibraryUsageDescription":"Enable PetDate to access your photo library to upload your profile picture with your pet, any violence, excess of nudity, stolen picture, or scam is forbidden",
        "NSPushNotificationsDescription":"This will allow pet date send you notifications everytime you get a match or a msn of your pet friend pals"
      }
    },
    "android": {
      "versionCode": 16,
      "package": "com.babelcomunicaciones.pDate2",
      "permissions": ["INTERNET",
        "ACCESS_COARSE_LOCATION",
        "ACCESS_FINE_LOCATION",
        "READ_INTERNAL_STORAGE",
        "WRITE_INTERNAL_STORAGE",
        "READ_EXTERNAL_STORAGE",
        "WRITE_EXTERNAL_STORAGE"],
        "playStoreUrl": "https://play.google.com/store/apps/details?id=com.babelcomunicaciones.pDate2"
    },
    "platforms": [
      "ios",
      "android"
    ], 
    "splash": {
      "image": "app/assets/splash.png",
      "resizeMode": "cover"
    },
    
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "app/assets/*"
    ]
  }
}

i hope some one could guide how to fix this error

1 Like

I have the same issue, did you figure it out?

Even my developer was getting the same exact msg, but when i tried on my phone, atleast this step was cleared in a second and it could open a permission pop-up. Faced some other issue afterwards

Try to force device login with FB web. Here is the example.
https://stackoverflow.com/questions/53962681/error-with-facebook-login-react-native-ios-expo

Web login works fine. If you would like to verify the idea, try uninstall the FB app from android device, then automatically fb login would be by fb web page. Then it works fine.

You serious, are you implying random app user will go delete his FB app in order to get web view to sign up because he wants to sign up to this new app via fb login? Is this a joke…

I have the same problem, where every data is correct, android package name & hash is set up in FB developer settings, works on ios does not work on android! Any info??