Closed dodomui closed 3 years ago
I have the same issue.
Vue.js, with capacitor and vuetify
Followed the instructions to configure/implement
my login page has a button to allow user to login using FB (along with other options) fb login method calls: let result = await FacebookLogin.login({ permissions: ['email', 'public_profile'] });
It then checks for the accessToken as part of result If thats ok it uses a call to window.FB.api('/me', { fields: 'email,first_name,last_name,id' }, function (response) { ... inside a promise
FB login works on chrome in dev mode, token returns to vue page and it is then able to proceed having validated login
Running through Android studio onto a device (tried different physical devices, different tablets, too) vue page loads, user clicks FB login button:- it loads the FB login page, which is confirmed
but token supplied then fails validation checks as the token messagereports
"An active access token must be used to query information about the current user"
oAuthException, code: 2500
I also can see my (correct) application ID declinedPermissions: [] epires (dated in december 2020) permissions: public_profile, email recentlyDeniedPermissions: []
I have the same problem.
But it only comes with versions of Android 9 and up...
Hey I've found the solution. There is no problem with the capacitor plugin.
The solution: You need to configure your Facebook app in Facebook developers.
@cvillavicencio01, I did configure my tester FB account as Facebook developers Admin. The problem is still there.
By the way, I did try with CapacitorFirebaseAuth plugin for Facebook Login at android device, it work just fine. So I suppose that my Android and Facebook developer configuration is just fine.
Describe the bug Unable to work on Android device.
Here is the log from Android studio.
To Reproduce Steps to reproduce the behavior: After call
await FacebookLogin.login({ permissions: FACEBOOK_PERMISSIONS })
it just stop without any response.Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information): Android: 9.1.0
Plugin: "@capacitor-community/facebook-login": "^1.0.2",
Ionic: Ionic CLI : 6.11.11 (/Users/.../.nvm/versions/node/v12.16.1/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.3.4 @angular-devkit/build-angular : 0.1001.4 @angular-devkit/schematics : 10.1.4 @angular/cli : 10.1.4 @ionic/angular-toolkit : 2.3.3
Capacitor:
Capacitor CLI : 2.4.2 @capacitor/core : 2.4.2
Utility:
cordova-res : 0.15.1 native-run : 1.2.1
System:
NodeJS : v12.16.1 (/Users/.../.nvm/versions/node/v12.16.1/bin/node) npm : 6.14.8 OS : macOS Catalina
Additional context Add any other context about the problem here.