facebook / facebook-ios-sdk

Used to integrate the Facebook Platform with your iOS & tvOS apps.
https://developers.facebook.com/docs/ios
Other
7.73k stars 3.5k forks source link

App switches to limited login. #2375

Open rebindev opened 1 month ago

rebindev commented 1 month ago

Checklist before submitting a bug report

Xcode version

Version 15.2 (15C500b)

Facebook iOS SDK version

17.0.0

Dependency Manager

CocoaPods

SDK Framework

Login

Goals

My app uses facebook login for business, but when a user disables tracking then it switches to limited login and unable to use my app or login. I'm aware the i have to enable tracking in the code to be able to use classic login. But when users disable tracking in settings-privacy & security we have no way to ask to track the user and login switches to limited.

Expected results

I want to be able to still login with classic mode when the users disable tracking, Switching to either limited or classic mode better to be in the developers hand not user's. I want to have the option to login in classic mode even when users disable tracking as i have no other option.

Actual results

My app uses facebook login for business, but it switches to limited even i have enabled tracking in the code but users disables tracking

Steps to reproduce

just login with facebook and disable tracking in settings-privacy & security then whatever i do it switches to limited login

Code samples & details

// INSERT YOUR CODE HERE
et viewController: UIViewController = (mainWindow?.rootViewController)!

        let config = LoginConfiguration(

            permissions: permissions, tracking: .enabled, nonce: UUID().uuidString

        )

        loginManager.logIn(viewController: viewController, configuration: config!) { loginResult in
            // Do something with loginResult
            switch loginResult {
               case .failed(let error):
                self.finishWithError(errorCode: "FAILED", message: error.localizedDescription)     
            case .cancelled:
                self.finishWithError(errorCode: "CANCELLED", message: "User has cancelled login with facebook")
            case .success(_, _, let accessToken):
                self.finishWithResult(data:self.getAccessToken(accessToken:  accessToken! ))
               }

        }
al3x88 commented 1 month ago

I have a similar issue! I have Facebook for Business Login ed many users cannot login. Let login page switch to limited.facebook and ends up with "Looks like app is not available"

For now the only workaround is to roll back to Facebook sdk 16.2, but then u also need to roll back to Xcode 15.1 because of another bug !!!!

Anyone can help?

al3x88 commented 1 month ago

After a deep investigation sounds like Facebook Login works only with ATTrackingManager enable. How to login with a user decides not to enable this permission? Apple doesn't allow to block a functionality due to the lack of this permission....

rebindev commented 1 month ago

@al3x88 your %100 right, They use ATTrackingManager to check if tracking enabled, if not it always returns limited login

al3x88 commented 1 month ago

@rebindev do you know how to make my app available also for limited login? At the moment if I use the limited login I received a message: "Looks like your app is not available".

Is there any specific setting on developers.facebook?

thanks so much

rebindev commented 1 month ago

@al3x88 Unfortunately there is no way except downgrading your sdk to previous working versions. It says in their documentation that by enabling tracking in your code it switches back to classic login but it seems not to be true in this version (17.0.0). You can check their documentation here

OskCha commented 1 month ago

According to this blog post there not that much we can do about it.

Today (2024/03/28), we have made changes to our Facebook Login SDK for iOS. These changes are part of the larger changes we are making to Facebook SDK for iOS and will affect all iOS developers who utilize Facebook Login SDK for iOS.

Those changes are motivated by Apple's Upcoming third-party SDK requirements

OS-ricardomoreirasilva commented 1 month ago

According to this blog post there not that much we can do about it.

Today (2024/03/28), we have made changes to our Facebook Login SDK for iOS. These changes are part of the larger changes we are making to Facebook SDK for iOS and will affect all iOS developers who utilize Facebook Login SDK for iOS.

Those changes are motivated by Apple's Upcoming third-party SDK requirements

Not sure why the changes are related to Apple's Privacy Manifest requirements. I believe that it's two different things that Facebook decided to include in 17.0.0, but that they're not providing enough information for us to implement it properly.

greymag commented 1 month ago

It looks like this is not a bug, but a new behavior. Which is very disappointing.

https://github.com/facebook/facebook-ios-sdk/blob/81305eb2cd6df2ac4c63102041c7fe7c9f25df97/FBSDKLoginKit/FBSDKLoginKit/LoginManager.swift#L691-L694

mjlmton commented 4 weeks ago

There is a question about user friends under limited login. When using limited login, the app only get the user friends's app scoped IDs (ASIDs). Can we get brief details about these user friends, such like name, avatar, etc. It seems like we can't use graph API under limited login any more.

rgg-egunnery commented 3 weeks ago

Has anyone gotten limited login to work with non tester accounts? Works fine for our test accounts but when trying to use it with public accounts, the new loginManager.logIn(configuration: configuration) just returns a cancellation. Not using anything that needs the app to be approved