Open vongkeo opened 4 years ago
Same issue
Having the same issue, please reply ASAP.
just follow the documentation, i think the problem with this:
AppDelegate.m
#import <FBSDKCoreKit/FBSDKCoreKit.h>
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [[FBSDKApplicationDelegate sharedInstance]application:app
openURL:url
options:options];
}
https://developers.facebook.com/docs/ios/use-cocoapods https://github.com/facebook/react-native-fbsdk/blob/master/example/ios/RNFBSDKExample/AppDelegate.m
@prih The AppDelegate.m implementation is same. The issue is with iOS version 13 and above. Is there any new integration to be done for iOS 13 and above?
@Poojapandey89 tested this on 13.6.1 everything is ok, after change AppDelegate.m
@Poojapandey89 Anyone got solution for this?
@JeyShah Updated the AppDelegated.m File with- AppDelegate.m
I think the following code, mentioned by @prih and @Poojapandey89, is missing or not updated in iOS Quick Start documentation.
// Code A
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [[FBSDKApplicationDelegate sharedInstance]application:app
openURL:url
options:options];
}
Quick start requests to include the following code, which is different from the above code(Code A):
// Code B
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
Now Xcode 12.2 shows the method(Code B) in Quick Start is deprecated, as shown below:
I added Code A to my AppDelegate.m
and now facebook login completes normally.
Thanks @prih and @Poojapandey89 .
By the way, my method definition was slightly different:
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}
I replaced return [RCTLinkingManager application:application openURL:url options:options];
with
return [[FBSDKApplicationDelegate sharedInstance]application:application
openURL:url
options:options];
Any updates for this issue? I've used @prih and @Poojapandey89 codes and it's still not working, stuck at the webview after logging in on FB app.
@HerbertLim thank you so much for your answer, my case was exactly that. I had the deprecated warning and was implementing the new method but for other linking related stuff so I had to merge what I had with this facebook bit on the new method and it worked like a charm!
Hello there, I have a problem with facebook LoginManager with "web_only" behavior but the result is when i click FB login button it show webview first after that there is a popup alert say "open this page in facebook app" continuously, And when i click on "open" option the native "Login with facebook" screen appear and last when i click on continues with the account in facebook app it go back to facebook login webview page in my application. So we are not getting response from facebook sdk.
Please do reply ASAP Thanks,