NativeScript / nativescript-facebook

NativeScript plugin, wrapper of native Facebook SDK for Android and iOS
Apache License 2.0
79 stars 50 forks source link

Vue - onLogin callback never runs after logging in (iOS) #198

Closed mrmacpholea closed 4 years ago

mrmacpholea commented 5 years ago

demo-vue never calls onLogin method after logging in

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Is there any code involved?

I checked other issues (#47, #59) but it does not apply, I'm using the same github code. Thanks!!!

mrmacpholea commented 5 years ago

Also checked #186 but I cloned recently (a week ago) #186 merge was done in April ...

DimitarTodorov commented 5 years ago

Hi @marcelopham We reproduced the issue and we can confirm that indeed the login callBack is not called on iOS. The issue is in the plugin itself, it is not related to the type of the demo-app[NG/VUE/TS]. We will investigate it and try to provide solution to the issue. You can follow this thread, we will notify once a fix is available. Regards, NativeScript Team

b02505048 commented 5 years ago

Try removing the code below in your AppDelegate

applicationModule.ios.delegate = BaseDelegate; 

Mine works after doing this.

tgpetrov commented 5 years ago

@marcelopham I managed to reproduce the issue with the following steps:

  1. Run a demo app (ts, ng or vue) login then logout - callback is called
  2. Run another demo app (if you run vue in the previous step, run ts or ng this time) - callback is NOT called

I believe this is related to the fact that all demo apps share the same app id and the Facebook SDK has troubles identifying the correct app to give the access token once you login. Can you confirm that you are having the issue when running only one of the demo apps or you are also running more than one app with the same id?

P.S. In order to confirm that the callback is called, on this line I added:

console.log('SUCCESSFUL LOG IN!!!');
elena-p commented 4 years ago

closing due to inactivity