Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error on trying to login to facebook using cordova facebook plugin

I made an android app which uses Cordova-Facebook plugin inorder to connect to Facebook and use the Facebook API's .. while trying it on the mobile i am able to login to Facebook and the api works but the second time i do so i get an error saying

cordova Facebook connect plugin fail on login ! Facebook error: failed to receive access token

( sandbox : disabled )

tried this : Cordova facebook connect plugin fail on login in android

but doesn't work

what am i doing wrong ?

like image 416
Dhayalan Pro Avatar asked Nov 10 '22 14:11

Dhayalan Pro


1 Answers

On native android, you can get this error when you try to getAccessToken without getActiveSession when user already logged (a session was created and you try to retrive it again). You can just add the session.getActiveSession() on onResume and will work. You can see here.

But I really don't know if the problem is with the plugin you are using (I never used), or in your code. You need to share more than that.

like image 199
Scoup Avatar answered Nov 14 '22 21:11

Scoup