facebook / facebook-ios-sdk

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

Login with test and admin accounts not working when app is restricted #1991

Closed minlite closed 2 years ago

minlite commented 2 years ago

Checklist before submitting a bug report

Xcode version

13.2

Facebook iOS SDK version

12.1.0

Dependency Manager

CocoaPods

SDK Framework

Login

Goals

I should be able to use Facebook login with test accounts (@tfbnw.net) and admin accounts when app is restricted or in development mode.

Expected results

Login should go through if a test or admin account is used while app is restricted or in development mode.

Actual results

Login fails with "Unsupported request" if the user is an admin account. Login fails with "Login Error: There is an error in logging you into this application. Please try again later." if the user is a test account.

Steps to reproduce

  1. Set up Facebook SDK 12.1.0 with an app that is restricted.
  2. Attempt Facebook Login with a test user account (ending with @tfbnw.net)
  3. Observe the error.

Code samples & details

You can see the issue currently on Kyank app (https://apps.apple.com/us/app/kyank-armenian-dating/id1491141893)

Sample project attached below
minlite commented 2 years ago

Screencast of the issue

https://user-images.githubusercontent.com/878667/146992105-eaac07b1-d888-4d54-990f-83a02d08b97f.mp4

Other possibly related bugs filed with Facebook

https://developers.facebook.com/support/bugs/593999978347939/ https://developers.facebook.com/support/bugs/461276762023201/

Other pertaining info

Login works fine on Android SDK 5.4.0, leading us to believe this might be an issue with the IOS SDK.

App ID experiencing this issue: 1386821234817930

minlite commented 2 years ago

Sample Project

FacebookLoginTest.zip

Please note that the sample project I attached may not have the issue any longer as Facebook has unrestricted our app. However, if you switch to a restricted app, the issue should be there.

s6joui commented 2 years ago

Having the same problem. Here are some other reports of what might be the same issue: https://stackoverflow.com/questions/69907890/facebook-login-error-unsupported-request https://stackoverflow.com/questions/70088079/facebook-ios-sdk-login-unsupported-request https://stackoverflow.com/questions/69894453/facebook-login-was-disabled-and-now-it-throws-errors https://stackoverflow.com/questions/70259845/facebook-not-logging-in-for-test-users

minlite commented 2 years ago

Note that the sample project I attached may not have the issue any longer as Facebook has unrestricted our app. However, if you switch to a restricted app, the issue should be there.

s6joui commented 2 years ago

@minlite could you let me know how you got facebook to unrestrict your app? I keep filing appeals but they don't seem to read them and they answer with what seems to be an automated message.

minlite commented 2 years ago

@s6joui I just sent them the links to the bugs filed with Facebook and explained that the issue is coming from Facebook. They unrestricted the app and tested it again, which worked. I had to go back and forth with them 5-6 times though as it seemed like the person on the other end was not reading what I had written just like you mentioned.

ppansy commented 2 years ago

Hey, sorry about the late response on this issue. This is caused by a backend issue for iOS logins. The product team has figured out the root cause & is actively working on getting a fix ready. I will update the thread as soon as the fix is out.

In the mean time, I would suggest filing a bug report as we will be able to work with you to figure out a solution specific to your app, ex. unrestrict the app as you mentioned

minlite commented 2 years ago

Closing this bug report as it seems like the product team has rolled out the fix.