Requesting ACAccount of type Facebook fails without permissions
| Originator: | phillips1988 | ||
| Number: | rdar://12485405 | Date Originated: | 11-Oct-2012 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 6.0 |
| Classification: | Reproducible: | Always |
Summary: Requesting access to an ACAccount of type ACAccountTypeIdentifierFacebook with an options dictionary that does not contain a valid ACFacebookPermissionsKey array fails with the following message:
Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: The proxied app is not already installed." UserInfo=0x2089e9d0 {NSLocalizedDescription=The Facebook server could not fulfill this access request: The proxied app is not already installed.}
Steps to Reproduce: Open the supplied Xcode project, run it on a device containing a valid Facebook account. Press the get me button and accept the permission prompt.
This should fail with the error message stated in Summary section.
Now edit the code, uncomment the options dictionary containing the part with ACFacebookPermissionsKey, for this example I am asking for email as a permission, run this and now the app will be granted access to the account.
Expected Results: The app should be granted access with basic information when no ACFacebookPermissionsKey is supplied in the access options dictionary.
Actual Results: If the Accounts framework is requesting permission for the Facebook app in question for the first time (the Facebook user has not yet authorised anything from this app before) and without the ACFacebookPermissionsKey being set, access is refused.
Notes: This fails only if it's the first time requesting permission - once the user accepts with permissions email, subsequent permission request without ACFacebookPermissionsKey succeed. You can test this by resetting the privacy settings on your device.
You should also check Facebook's apps section and observe the test app's access status.
Facebook documents this and insists the following:
To create this basic connection using the iOS 6 native Auth Dialog, apps must request access to a user's basic profile information by asking for one of email, user_birthday, or user_location permissions
This means that when the user first connects the app to their account, email, user_birthday, or user_location must be passed in as permissions.
The Apple documentation should be update to reflect this. Notably by omitting that the ACFacebookPermissionsKey is optional which is not true for first time install.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!