Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authentication Fails with Facebook App Installed (iOS)

I've just started seeing a problem with Facebook Connect authentication. If I have version 3.4.4 of the iOS app installed, my delegate's fbDidNotLogin method gets called with an error message of "The user denied your request". When I uninstall the FB app, the authentication works fine. Is anyone else seeing this? Does anyone know how I can route around this bug?

Here's my call to the Facebook object:

[[app facebook] authorize:[NSArray arrayWithObjects:
                           @"publish_stream", @"offline_access", nil]
                           delegate:app];
like image 437
Steve Liddle Avatar asked Aug 31 '11 13:08

Steve Liddle


3 Answers

Make sure your application bundle id is set correctly on your app's Facebook page.

I think they just started to enforce this, which is why it just recently broke.

You should be able to change this by going into your apps settings on Facebook, and clicking 'Edit Settings' from the screen where you get your App Id. The 'Mobile Native' section will allow you to change your iOS Bundle ID to match the Bundle Identifier you have in Info.plist.

Hope this helps someone! Know that you can get this working with the latest Facebook app, and it is probably a configuration issue like the one described above.

like image 200
CornPuff Avatar answered Oct 16 '22 15:10

CornPuff


I can confirm I'm experiencing the same issue here. I backtraced a bit, and I see the facebook app is opening my app with this query string in the url:

error_reason=user%5Fdenied&error=access%5Fdenied&error_description=The%2Buser%2Bdenied%2Byour%2Brequest%2E%3F%5F

I guess unfortunately there's nothing we can do but wait :S

like image 4
Javier Soto Avatar answered Oct 16 '22 14:10

Javier Soto


It's pretty obvious, but if your application is sandboxed then you need to ensure that everyone signing in with it is a 'Tester' or higher in the Facebook app settings. :-$

like image 1
Benjie Avatar answered Oct 16 '22 13:10

Benjie