1

I've searched for an answer to this question and have been unable to find any answers.

I've got a range of iOS apps that I want to use the same Facebook app. The SSO works perfectly with the first app I created and tested on. But all the other fail and get returned an unknown_error.

I'm calling:

self.facebook = [[[Facebook alloc] initWithAppId:<app id> urlSchemeSuffix:<app suffix> andDelegate:self] autorelease];

This is all working and even when the sign ins are failing I am returned back to the correct app. However, each time my the:

- (void)fbDidNotLogin:(BOOL)cancelled

method get called where cancelled equals NO.

Are there some other settings I need to change somewhere? Is this because my apps have not yet been submitted to the App Store (except the one that is working)? If that's the case, how am I meant to test this stuff?

Thanks, Daniel

Daniel Wood
  • 4,487
  • 3
  • 38
  • 36

2 Answers2

9

I was having the same problem as described above. The way I fixed it was to make sure that all of the Bundle IDs of the iOS apps that are sharing the Facebook app are listed.

Multiple iOS Apps Sharing the Same Facebook App

As you can see in the picture, I have two URL Scheme Suffixes and the blurred out portions are the Bundle IDs of the apps that are connecting to this facebook app. Since it's a free and paid version, I only use one App Store ID so the posts from the free version will link to the paid version App Store link.

Hope this helps!

alk3ovation
  • 1,202
  • 11
  • 15
  • Were you able to get this working before you shipped the product off to Apple? I can't select that my app is a Native iOS App until I have an App Store ID and I assume that won't exist until I actually send the app to Apple. But it seems a bit weird to not be able to get the app to work with Facebook before it's deployed. – valheru May 15 '12 at 22:45
  • Yes, you get to choose your own app id. You only need to choose a name and go through the beginning steps of uploading your app to get an app id. You don't actually have to upload anything at this point. – benathon Jul 17 '12 at 21:23
3

I found the useful "unknown_error" message only occurred when authenticating via the iOS Facebook app.

A quick and dirty workaround is to force the Facebook SDK to use mobile safari for authentication. Look for [self authorizeWithFBAppAuth:YES safariAuth:YES] in Facebook.m and change the FBAuth value.

Not the nicest solution... but if you need a project out of the door... ;)

  • This works. Perhaps I'll try and use the FB app for SSO again at a later date when hopefully this works as it should. For now though this will certainly do. – Daniel Wood Oct 27 '11 at 12:32