Friday, 15 May 2015

ios - How to handle the "ACAccountCredentialRenewResultRejected" message when calling renewCredentialsForAccount -


Let me create an ACAccountStore , access the user's Facebook account, > I am able to retrieve the token from the ACACCount objects, and credentials. But when I try this token and try to get information from Facebook, it will not be certified, and will attempt to renew the credentials for use for the renewal account limit only ACAccountCredentialRenewResultResjected will answer.

I can not get permission pop-ups to show again to request permission in any easy way. The only way is that I can get it once for permission requests or change the permissions asking in the app, or delete and add settings in my Facebook account.

How do I go about obtaining a valid proof token at this point?

Since there is no accepted answer, I tries to answer what I found After my comment above, I read the updated certificate documentation, which says, "If the user has unauthorized your app, then this renewal request is ACAccountCredentialRenewResulted."

What is a missdling which is not what the user rejects but Facebook

I think I understand this concept now and I try to answer those who have failed from this issue like me. In fact, what I did not know was that when I get the ACAccountCredentialRenewResultResjected result, my FB token will be completely reset and this is the key element in the puzzle.

So what you need to do for different results:

  • ACAccountCredentialRenewResultRenewed You are good to go and you have a new token Go and revive your SLRE with this new token.
  • ACAccountCredentialRenewResultRejected : Your token is reset , if you try to get it, then it zero . You have to request permissions from users from scratch and have to "install" the app for Facebook. This means that before you ask for "email + other reading permissions" first (and if you need it) ask for permission to write in a different request (for example if I want to upload a photo Why can I bother Facebook twice)
  • ACAccountCredentialRenewResultFailed : I could never regenerate it. I leave the user an error message here

    This is what came with me. This is a very bad API that has a bad document and missing specimens. Apart from this, examples surrounding the Internet are about "success" and they do not care about the fact that users can cancel permissions outside the app. I am constantly trying & amp; The development mode opened the gray hair but at the end I hope that my response helps others.

No comments:

Post a Comment