I wish to access the user's unread Facebook messages in my app. I'm using the Accounts framework. Calling accountStore.requestAccessToAccountsWithType:options:
requires the permissions be given as part of the options.
I want to access /{user-id}/inbox
stated in their Graph API. This states that the read_mailbox
permission is required. Reading the permissions page, it states:
This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop, in-car and TV apps will not be granted this permission.
In other words: This is available to basically nobody.
After such a blow, I feel like I'm pulling at straws here, but I'm wondering if this applies to the Accounts framework login. Their API references the standard Facebook login (with a button and then a permissions screen) and doesn't mention login through the Accounts framework.
So I tried it, and got an iOS UIAlertView asking if I wanted to allow my app to access the given permissions, including the Inbox permission. I tapped "OK", and was granted access. But then calling accountsWithAccountType:
returns 0 accounts (I have a Facebook account logged in on device).
I'm wondering if anyone's done any further investigation, or knows any more about this?