iosfacebooksocial-framework

ACAccountStore requestAccessToAccountsWithType:options:completion always showing permissions prompt


As the title suggests, I'm having an issue with the method ACAccountStore requestAccessToAccountsWithType:options:completion. I expect this method to only prompt the user for permission the first time it is called for my app, but it is being shown every time.

Is there some way of checking whether the user has granted permission so I don't have to request it? Or is there some other kind of magic that will stop this behaviour?

I find this very odd, since in an earlier version of the same app, the behaviour was as I expected - it only prompted for permission on the first call.


Solution

  • Answering my own question. Hopefully somebody will find this useful some day.

    What seemed to be causing the problem was a mismatch between the permissions available to my app, in particular the basic read permissions, and the permissions I was requesting. While my app's Facebook page showed 'email' as a basic read-permission, it was requesting 'basic_info'. Once I changed the permission to 'email', the app asked once and didn't do so again.