bisrael / cordova-plugin-facebook

Cordova Plugin for iOS and Android Facebook SDK
MIT License
25 stars 21 forks source link

How to debug error responses? #23

Open Wade-McDaniel opened 7 years ago

Wade-McDaniel commented 7 years ago

Greetings, and thank you for writing this plugin!

I've included this plugin in my ionic v1 app, inject it into my service as $cordovaFacebookLogin, and try to authenticate to Facebook like this:

$cordovaFacebookLogin.login({ permissions: [] })

When I testing on iOS 10.2 I get back JSON that looks like this:

{"userID":"1234567890","cancelled":true,"success":false,"accessToken":"token-here","error":true}

But I didn't cancel! When I debug the access token here it says it's valid:

https://developers.facebook.com/tools/debug/accesstoken

My question is: how do I best determine what the error is here?

In case it helps, when I run that function the Facebook app opens, and I see a page that is pretty-much blank except for the word "cancel" in white at the top. Then after a few seconds the Facebook app closes and returns to my app with the above JSON.

Thanks again!

samasmith89 commented 7 years ago

Yeah, I'm getting the same issue here, and having trouble debugging...

I actually got a successful response the first time I ran the facebook authentication, but since then I can only get the onFailure method to fire...