Reputation: 56948
Building an app using the Facebook iOS SDK. When testing on the simulator, I am able to log into Facebook (using Mobile Safari) and get a valid auth token. However, when I move to my testing device (iPhone 3gs running 4.3), after authenticating in the Facebook App, it returns with:
fb{APP_ID}://authorize#error=access%5Fdenied&error_reason=user%5Fdenied
Is there something special I need to do on the device or in the Facebook application itself?
Upvotes: 3
Views: 760
Reputation: 3705
If you've never deployed your app to the App Store or if the app is in Facebook's sandbox mode, users will need to be registered (for example, as testers, developers, or administrators) with Facebook for your app. Go to your app's admin page on Facebook, click Edit Settings in the upper right corner, then click Roles on the left side. There you can add developers and testers.
Upvotes: 0
Reputation: 56948
Found out that this happens if your Bundle ID in your Facebook Application does not match the one in your iOS application. After updating both to match the same string, the authentication worked as expected. To my Facebook Overlords: this seems like a case where a different error string would be appropriate. Perhaps
Application Bundle ID could not be validated.
or similar.
Upvotes: 3