I'm having problems implementing this functionality after following Facebook's tutorial: https://developers.facebook.com/docs/howtos/share-appid-across-multiple-apps-ios-sdk/
Basically, I have 2 targets under the same project - one for the free version and one for the premium. I have created and set up a single Facebook app for this and added 2 url scheme suffixes:
Also, I've added the suffixes within the respective plist files. For example, the premium app is defined with:
Where the "xxxxx..." is just my Facebook app ID.
After all this, I still can't log in to the application on iOS 5.0 and 6.0 (using native FB dialog or the SDK dialog within Safari). This is what I get when I log in via Safari:
The code doing the login is:
NSArray *permissions = kInitialPermissions;
BOOL result = NO;
FBSession *session = [[FBSession alloc] initWithAppID:@"xxxxxxxxxxx"
permissions:@[]
urlSchemeSuffix:@"premium"
tokenCacheStrategy:nil];
if (allowLoginUI ||
(session.state == FBSessionStateCreatedTokenLoaded)) {
[FBSession setActiveSession:session];
}
result = [FBSession openActiveSessionWithReadPermissions:permissions
allowLoginUI:allowLoginUI
completionHandler:completion];
return result;
Any ideas will be appreciated. Thanks!