我在使用官方 react-native-fbsdk 包进行 facebook 登录时遇到问题,它在 android 中运行良好,但在登录完成后在 IOS 中运行良好或取消它重定向到空白页面而不是返回到我的应用程序。
我做了什么:
链接的 react-native-fbsdk
在 facebook 页面关注 IOS 入门指南
我们将不胜感激。
最佳答案
你需要在ios项目中修改你的AppDelegate.m文件
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;
}
关于ios - React原生fbsdk登录IOS白屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42336718/