question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FBSDKInternalUtility always returns isFacebookAppInstalled equal to 0

See original GitHub issue

This bug only affects iOS standalone app’s Facebook login because only facebook-ios-sdk detects is Facebook app installed and changes UI depending on this https://github.com/facebook/facebook-ios-sdk/blob/master/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.m#L364`

Environment

software version
expo 26.0.0
react-native https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz

exp diagnostics output

screen shot 2018-04-08 at 1 04 16 pm

App’s target is iOS Standalone

Steps to Reproduce

On any Expo standalone app on iOS try to login with Facebook with behavior “browser” when you have installed Facebook app. Then remove Facebook app from your device and try to do the same.

You will always see the same UI. This is a bug.

Expected Behavior

Should work in the way like it works in Wolt app

If I set behavior “browser” for Facebook login and Facebook app is installed on the device, on iOS user should see UI with “Log in with the Facebook app” button and be able to login without entering email and password

screen shot 2018-04-08 at 1 12 22 pm

If I set behavior “browser” for Facebook login and Facebook app is not installed on the device, on iOS user should see UI without “Log in with the Facebook app” button

screen shot 2018-04-08 at 1 15 22 pm

Actual Behavior

When I set behavior “browser” for Facebook login and Facebook app is installed on the device, on iOS I see UI without “Log in with the Facebook app” button

screen shot 2018-04-08 at 1 15 22 pm

Reproducible Demo

The only thing you can test is to see how UI looks for different auth urls using browser dev tools

screen shot 2018-04-08 at 1 26 12 pm

Left url

Right url

The difference between urls is only in one character on left fbapp_pres=1 on right fbapp_pres=0

I think the problem is in your private FBSDKInternalUtility screen shot 2018-04-08 at 1 42 30 pm

It always returns 0 in this line in facebook-ios-sdk

loginParams[@"fbapp_pres"] = @([FBSDKInternalUtility isFacebookAppInstalled]);

I would fix it by myself, but it is not possible as it is in your private module 😃

@terribleben please fix it.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
terriblebencommented, Apr 11, 2018

It looks like our app builder code had a regression where it stopped adding the Facebook application scheme to your Expo app’s configuration. I’ve committed a change to fix this which will go out next time we deploy our app builder.

In the meantime, I think a workaround would be to add [ "fbapi", "fb-messenger-api", "fbauth2'", "fbshareextension" ] to your app.json under ios.infoPlist.LSApplicationQueriesSchemes, for example

"ios": {
  "infoPlist": {
    "LSApplicationQueriesSchemes": [ "fbapi", "fb-messenger-api", "fbauth2'", "fbshareextension" ]
  }
}

…and then re-run exp build:ios after making that change.

After we deploy the change and close this ticket, the workaround will no longer be needed (because it will be added automatically as long as your app has a FacebookAppID).

0reactions
serhiipalashcommented, May 8, 2018

Everything works for us. I am closing this issue. Thanks again @terribleben

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode 9 FBSDKLoginManager crash involving FBSDKInternalUtility ...
I've Installed FacebookSDKs iOS v4.28 in to Xcode 9, and added a custom Facebook Login button using FBSDKLoginButtonDelegate. When the button is pressed, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found