OSX 10.9.2
Xcode 5.1
Corona SDK 2014.2214 (Pro version)
Tested on iOS 6.1.6 and 7.1
I’m trying to implement the Facebook.* Graph API and I’m getting “loginFailed” events in certain situations.
I’m using the Facebook Connect sample app for testing, updated with my Facebook AppID.
Note: Remember to press “Logout” and remove apps from background between testing each case below.
Case 1:
See note above.
No native facebook app installed.
When running the sample app, I get a webView where I’m asked to log in, then returns to sample app.
Result: successful login
Case 2:
See note above.
Native facebook app installed.
*Not* logged in to either the Facebook app or the Facebook section of the Settings app.
When running the sample app, the native app is called where I’m asked to log in, then returns to sample app.
Result: successful login
Case 3:
Native facebook app installed.
Only logged in to the Facebook app, but *not* in the Facebook section of the Settings app.
When running the sample app, the native app is called where it shows a blank grey Facebook page for a while and then returns to the sample app.
Result: successful login
Case 4:
See note above.
Native facebook app installed.
Logged in to both the Facebook app, and the Facebook section of the Settings app.
When running the sample app, a native dialog is displayed saying ““Facebook” would like to access your basic profile info and list of friends [Don’t Allow] [OK]”
Press OK
Result: login failed
Go to Facebook section of the Settings app.
The sample app “Facebook” is missing from the “Allow These Apps to Use Your Account”
Case 5:
See note above.
Native facebook app installed.
Logged in to both the Facebook app, and the Facebook section of the Settings app.
When running the sample app, a native dialog is displayed saying ““Facebook” would like to access your basic profile info and list of friends [Don’t Allow] [OK]”
Press Don’t Allow
Result: login failed
Go to Facebook section of the Settings app.
The sample app “Facebook” is *listed* in the “Allow These Apps to Use Your Account” list, but the toggle is false.
Change toggle to true.
Repeat Case 5 from the beginning.
It just repeats with the Native “Don’t Allow OK” dialog with unsuccessful login even though OK is pressed.
I’ve tested this with devices running iOS 6.1.6 and iOS 7.1.
The problem is that in most cases I’d assume that Case 5 is relevant for most users, which makes this approach very unreliable.
Could this be a bug?