I’m creating a singleton to access all Facebook methods and I want to handle the Login dialog in this singleton.
I followed the iOS SDK Tutorial on Facebook, but it only allows me to login within application launch and not when a user presses a button.
Whats the alternative to
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
return [self.facebook handleOpenURL:url];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [self.facebook handleOpenURL:url];
}
It seems to be the problem, my App isn’t switching to the browser or FB App to login.
When I’m implementing the same stuff in AppDelegate it works, but immediatly after Application launch.
I have solved it like this:
in AppDelegate:
And in Singleton: