i am having problem using official react-native-fbsdk package for facebook login, it works well in android but in IOS after the login finished or cancelling it redirects to blank page instead of going back to my app.
What I have done :
Linked react-native-fbsdk
Followed IOS getting started guide in facebook page
any help will be appreciated.
You need to modify your AppDelegate.m file in ios project
Facebook react-native faq
This problem indicates that the code in the AppDelegate.m file hasn't been setup properly. Confirm that your code is similar to this example:
AppDelegate.m
#import <FBSDKCoreKit/FBSDKCoreKit.h>
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
// Add any custom logic here.
return YES;
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
BOOL handled = [[FBSDKApplicationDelegate sharedInstance]
application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation
];
// Add any custom logic here.
return handled;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With