I implemented this method to login to Facebook in App Delegate using Xcode 7, and it works fine:
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options { return [[FBSDKApplicationDelegate sharedInstance] application:app openURL:url sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] annotation:options[UIApplicationOpenURLOptionsAnnotationKey]]; }
However, since I need to use Xcode 6 to send my application to the App Store, this method does not exist and it gives me errors.
If I commented on the above method and left only the following:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation ]; }
it will not work, that is, when the user tries to log in, he will not return to the application.
Is there an easy solution for this? Thanks!
By the way, I carefully followed all the steps in: https://developers.facebook.com/docs/ios/getting-started
source share