Hi
I’m trying to implement facebook log-in and this requires the app to handle an url from the internal webview that asks the user to log in with facebook.
Unfortunately, I am unable to get the application:openURL:options to fire.
I’ve check my plist and the URL schemes for facebook seam to have generated correctly.
I’ve been stuck on this for a couple days and was hoping someone might have an idea how to tap into that delegate method.
The following is the code. The comments explain what works and what does not.
@implementation FacebookDelegate
+ (void) load
{
//.. THIS GETS CALLED :)
NSLog(@"FacebookDelegate | mm | load()");
//Instatiate delegate
static FacebookDelegate * instance = [[FacebookDelegate alloc] init];
//This Notification works :)
[[NSNotificationCenter defaultCenter] addObserver:instance selector:@selector(application_didFinishLaunchingWithOptions:) name:UIApplicationDidFinishLaunchingNotification object:nil];
//This notification does not :(
[[NSNotificationCenter defaultCenter] addObserver:instance selector:@selector(application_openURL_options:) name:@"NMEAppDelegate application:openURL:options:" object:nil];
}
- (void) application_didFinishLaunchingWithOptions:(NSNotification *)notification
{
//.. THIS DOES GET CALLED :)
NSLog(@"FacebookDelegate | mm | application_didFinishLaunchingWithOptions()");
}
- (void) application_openURL_options:(NSNotification *)notification
{
//.. THIS DOES NOT GET CALLED :(
NSLog(@"FacebookDelegate | mm | application_openURL_options()");
}
@end