Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook Login doesn't open the App when Installed #2374

Open
5 tasks done
OS-ricardomoreirasilva opened this issue Apr 5, 2024 · 8 comments
Open
5 tasks done

Facebook Login doesn't open the App when Installed #2374

OS-ricardomoreirasilva opened this issue Apr 5, 2024 · 8 comments

Comments

@OS-ricardomoreirasilva
Copy link

Checklist before submitting a bug report

Xcode version

15.0

Facebook iOS SDK version

17.0.0

Dependency Manager

CocoaPods

SDK Framework

Login

Goals

When the Facebook App is installed on the device, when logging in through Facebook, the app is used instead of the In-App Browser.

Expected results

The In-App Browser is always used, regardless of whether or not the app is installed. This did not happen in previous versions.

Actual results

In-App Browser login is always triggered.

Steps to reproduce

No response

Code samples & details

No response

@almahdc
Copy link

almahdc commented Apr 8, 2024

Same.

@OS-ricardomoreirasilva
Copy link
Author

@almahdc apparently, this is related to the Limited Login functionality (you can check in the "Limitation" section): https://developers.facebook.com/docs/facebook-login/limited-login/ios.
I do not understand here that, if the tracking parameter defaults to enabled, why am I still getting the Limited Login instead of the classic one?

@kuroky
Copy link

kuroky commented Apr 9, 2024

@almahdc apparently, this is related to the Limited Login functionality (you can check in the "Limitation" section): https://developers.facebook.com/docs/facebook-login/limited-login/ios. I do not understand here that, if the tracking parameter defaults to enabled, why am I still getting the Limited Login instead of the classic one?

hi bro, have you resolved, with the new api, it still can't open facebook native app

   FBSDKLoginManager *loginManager = [FBSDKLoginManager new];
   NSArray *scopes = @[@"public_profile", @"email", @"user_friends"];
   FBSDKLoginConfiguration *config = [[FBSDKLoginConfiguration alloc] initWithPermissions:scopes
                                                                                  tracking:FBSDKLoginTrackingLimited 
                                                                                     nonce:@"123"];
   [loginManager logInFromViewController:nil
                            configuration:config
                               completion:^(FBSDKLoginManagerLoginResult * _Nullable result, NSError * _Nullable error) {
   }];

@OS-ricardomoreirasilva
Copy link
Author

@almahdc apparently, this is related to the Limited Login functionality (you can check in the "Limitation" section): https://developers.facebook.com/docs/facebook-login/limited-login/ios. I do not understand here that, if the tracking parameter defaults to enabled, why am I still getting the Limited Login instead of the classic one?

hi bro, have you resolved, with the new api, it still can't open facebook native app

   FBSDKLoginManager *loginManager = [FBSDKLoginManager new];
   NSArray *scopes = @[@"public_profile", @"email", @"user_friends"];
   FBSDKLoginConfiguration *config = [[FBSDKLoginConfiguration alloc] initWithPermissions:scopes
                                                                                  tracking:FBSDKLoginTrackingLimited 
                                                                                     nonce:@"123"];
   [loginManager logInFromViewController:nil
                            configuration:config
                               completion:^(FBSDKLoginManagerLoginResult * _Nullable result, NSError * _Nullable error) {
   }];

Hey @kuroky!

From my understanding of the documentation, the code you posted will never trigger the Facebook App as having FBSDKLoginTrackingLimited will always use the Limited Login (that doesn't use the Facebook App).
I haven't tried this myself but, from what I've read, you have to:

  • Use FBSDKLoginTrackingEnabled.
  • Add the AppTrackingTransparency permission to your app.

@kuroky
Copy link

kuroky commented Apr 9, 2024

@almahdc apparently, this is related to the Limited Login functionality (you can check in the "Limitation" section): https://developers.facebook.com/docs/facebook-login/limited-login/ios. I do not understand here that, if the tracking parameter defaults to enabled, why am I still getting the Limited Login instead of the classic one?

hi bro, have you resolved, with the new api, it still can't open facebook native app

   FBSDKLoginManager *loginManager = [FBSDKLoginManager new];
   NSArray *scopes = @[@"public_profile", @"email", @"user_friends"];
   FBSDKLoginConfiguration *config = [[FBSDKLoginConfiguration alloc] initWithPermissions:scopes
                                                                                  tracking:FBSDKLoginTrackingLimited 
                                                                                     nonce:@"123"];
   [loginManager logInFromViewController:nil
                            configuration:config
                               completion:^(FBSDKLoginManagerLoginResult * _Nullable result, NSError * _Nullable error) {
   }];

Hey @kuroky!

From my understanding of the documentation, the code you posted will never trigger the Facebook App as having FBSDKLoginTrackingLimited will always use the Limited Login (that doesn't use the Facebook App). I haven't tried this myself but, from what I've read, you have to:

  • Use FBSDKLoginTrackingEnabled.
  • Add the AppTrackingTransparency permission to your app.

hey @OS-ricardomoreirasilva
thanks! follow your step, i can open facebook app now

  1. facebook app AppTrackingTransparency enable
  2. my app AppTrackingTransparency enable
  3. insure iPhone Setting -> Privacy&Safety -> Allow Track enable
  4. Use FBSDKLoginTrackingEnabled to init FBSDKLoginConfiguration

that work

@almahdc
Copy link

almahdc commented May 2, 2024

Update: this doesn't seem as a bug. They just changes the behaviour:

  • Users who don't allow transparency tracking will not be redirected to the FB app but just to web.

Also, .enabled for FBSDKLoginConfiguration is the default, so you don't have to change anything around your code most likely.

@OS-ricardomoreirasilva
Copy link
Author

Update: this doesn't seem as a bug. They just changes the behaviour:

  • Users who don't allow transparency tracking will not be redirected to the FB app but just to web.

Also, .enabled for FBSDKLoginConfiguration is the default, so you don't have to change anything around your code most likely.

Still, they introduced a breaking change without updating the official documentation (and even the transparency tracking need is not very much mentioned). And considering the number of people who came here with the same issue, it's definitely an issue. It may not be a bug per se but it's a huge lack of commitment with the community.

@Jacky-LinPeng
Copy link

FBSDK16.3

I have the same problem
Hope the official developers can come out to help answer, this is our configuration caused by the bug, or the design is so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants