Already submitted this issue as a bug, just posting it here to see if any community members might have some insight…
(This bug was experienced using Android 4.4.2 on a Nexus 7 device using CoronaSDK.2014.2189)
Whenever the native Facebook app is NOT installed on my device, and our app attempts a facebook.login request, the login ends prematurely with a ‘loginCancelled’ session status.
On the display, the end user sees a brief flash that appears to be a dialog window of sorts opening, which disappears as soon as the ‘loginCancelled’ response is received.
First, I skimmed some forum threads that mention this error. Most (if not all) of the solutions to the OP’s issues seemed to stem from (1) facebook-side configuration errors, (2) app-side configuration errors, or (3) an incorrect keystore hash.
So, after verifying our app settings, app id, etc, just to cover all my bases, I regenerated our release.keystore (Note: we also tested with the android debug.keystore, same results), generated the hash from the keystore, updated the hash on the facebook app’s settings page, and rebuilt our app using the new keystore. I tried about 5 minutes after updating the facebook settings and had no luck logging in. I thought maybe there might be some propagation period, so I waited 2 hours and tried again, to no avail. (Still not working several hours after update. And yes, it does include the ‘=’.)
Is there a particular version of OpenSSL I need to use when generating the hash? (I’m on OS X, but have access to Windows)
Our project utilizes the easyfb lib. Just to make sure that it wasn’t causing any complications, I created a test project (attached) that makes the facebook.login call directly, and I’m experiencing the same results. (My test call requires only the “basic_info” permission)
The kicker is that when the native facebook app IS installed the app is able to complete the login routine swiftly and consistently. (The other scenario we tested was devices with system-level facebook integration (such as an HTC one device) In that case, the app *was able* to log in correctly.)
No real issues to speak of on iOS. And Android works fine if there’s some sort of facebook account already associated with the device or the native app has been installed. Otherwise, I can’t seem to get my device to authenticate with facebook.
One other note is that once I’ve experienced the ‘loginCancelled’ event, I have to completely uninstall and reinstall the app before I can try again _with_ the native facebook app. If I try to login without the app. Install the facebook app. And then try again, the app gets stuck with a nativeActivityIndicator spinner. (The practical implication being that even if we recommended our users install the native fb app (which surely isn’t an option) but even if it was an option, they’d still have to reinstall our app to try again- so… not really a great solution.)
Conversely, if I achieve a successful login while the native fb app _is_ installed and then uninstall the native fb app, the cached token continues to work until I issue a .logout request. (expected behavior, I’m sure)
At this point I believe I’m out of troubleshooting options and any insight into this issue that might steer us in the right direction would be more than appreciated.
Note: if you try to run the attached files, don’t forget to update the SOME_FB_APP_ID references in main.lua & build.settings