I have implemented the FBConnect SDK in my application and it works great on the simulator. Then I changed the .plist application file accordingly and added the necessary method for my AppDelegate when Facebook is installed on the device:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
NSLog(@"handleOpenURL Method was called and sent the following:");
NSString *urlString = [NSString stringWithContentsOfURL:(NSURL *)url];
NSLog(@"URL String: %@", urlString);
return [[flipsideViewController facebook] handleOpenURL:url];
}
From the above NSLogs and the observation that my application returns to the forefront after authorizing access via Facebook, I conclude that the FB application transfers control to my application accordingly. Unfortunately, the handleOpenURL: url method on Facebook.m is not actually called as I request in my AppDelegate (i.e., none of the NSLogs listed below is displayed).
- (BOOL)handleOpenURL:(NSURL *)url {
NSLog(@"handleOpenURL was handled by SDK. Good!");
if (![[url absoluteString] hasPrefix:[self getOwnBaseUrl]]) {
NSLog(@"handleOpenURL structure doesn't match the structure used for Facebook authorization. Aborting.");
return NO;
}
, ( "facebook" ) , , "fbDidLogin" ( ) , .
? , , ? , .
:
1.) .
2.) handleOpenURL , AppDelegate.
3.) /.
4.) DemoApp , , handleOpenURL "DemoAppAppDelegate".
, Advance!