Please try the attached update (1.03). I haven't tested it myself.
You need to use FacebookSdk.Initialize2 and it will raise the SignError event in the module where FacebookSdk was initialized.
Hello
@Erel,
I just finished to test and worked perfectly. But I noticed some details those could be important before to release the upgrade:
1. You told that this lib release should be 1.03. But in B4A panel, even after replacing the lib, the version remains 1.02 (I tested two times, closed and reopened the framework). Probably you forgot to change the version code. See:
2. When the user cancels the authentication (if the password is incorrect or even if he gives up), Fb raises a "Result" which doesn't raises an event in B4A. This event is raised in B4i and is important because if the app showed a progress dialog when the user called the authentication process it's not possible to dismiss the dialog in the case of user cancel. Follows the log for your convenience:
Facebook - SignIn
** Activity (mainpage) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
Facebook - ResultArrived: Intent { (has extras) }
Facebook cancel
** Activity (mainpage) Resume **
Finally, I tested the successful login, which worked perfectly. Follows the log:
Facebook - SignIn
** Activity (mainpage) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
Facebook - ResultArrived: Intent { (has extras) }
Facebook success: com.facebook.login.LoginResult@6a9ab7a
signInWithCredential start
** Activity (mainpage) Resume **
onAuthStateChanged: com.google.firebase.auth.internal.zzn@ff3229f
signInWithCredential complete: true
** Activity (mainpage) Pause, UserClosed = true **
Killing previous instance (partnersearch).
** Activity (partnersearch) Create, isFirst = false **
** Activity (partnersearch) Resume **
That's it. In my situation the new library is perfect. To publish as a release I think that it's needed to fix the version code (1.02 -> 1.03) and maybe to add the cancel event.
Again, thanks
@Erel for your agility and kindness as always. B4X is certainly the worlds best framework for multiplatform development because your efforts! Thanks!