Hello,
I was trying to make the facebook authentication on a bare react native app. So i implemented the method as the documentation said.
Facebook.logInWithReadPermissionsAsync
Everything works fine at the beginning my app open my facebook app and prompt the screen asking you if you want to make login with facebook but then when facebook redirects back the modal that was previously open never get closed so the authentication never completes.
Then the problem was solved adding the next lines to my appDelegate.m
#import <FBSDKApplicationDelegate.h>
.
.
.
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
{
[[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
options:options];
return YES;
}
But the i need to comment some lines because xcode shows that method was duplicated.
The previous method was like this
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *) options {
return [self.authorizationFlowManagerDelegate resumeExternalUserAgentFlowWithURL:url];
}
If some one knows what does the previous lines because indeed the new method solve facebook login problem but I don’t know id the lines I commented were important.
Thanks in advance for your help.