Question

I'm having some trouble handling Facebook errors.

My app displays a page that tells users they've blocked the app when the login fails. This page tells the users to go to settings>>privacy>>facebook and unblock the app.
I navigate to this page if the sessionStageChanged method contains an error.

I am however noticing a problem when a user changes their password, which will invalidate the iOS Facebook integration login, this will off course result in the error message not being correct anymore.
I've created another error page that tells the user that their password within ios integration has expired but I'm having trouble to figure out when I need to navigate to it.

-Both the different types of failure return Facebook error 2, which is a pretty generic error so I can't find what caused the problem from this error code.
-I've found another answer on here that used the [FBSession renewSystemCredentials] method but I am noticing that this will also return the ACAccountCredentialRenewResultFailed || Rejected error in both cases so this also won't work.
-I found the official documentation with this page: https://developers.facebook.com/docs/facebook-login/testing-your-login-flow/ but this does not have a solution only an explaination.

What should I do in this case?
How do I now when to navigate to the app blocked page and when to navigate to the password changed page?
I'm using Facebook SDK version: 3.10.0.

Thanks in advance!

Était-ce utile?

La solution

Thanks for the comments.
After Ming Li's answer I found some stuff on this page: https://developers.facebook.com/docs/ios/errors
But after testing it in my app the Facebook error returned the same error for an invalid login.
I'm going to handle this by letting my user manually navigate trough the different types of solutions.

Autres conseils

See the "Handling Errors" section of this page for strategies on how to notify users of different types of errors: https://developers.facebook.com/docs/graph-api/using-graph-api/#errors

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top