Open stevesaygoodbuycom opened 4 years ago
test conditions
-> failed ( cacelled return )
I think when use facebook app login, safari web didn't login.. so facebook sdk return cacelled..
If loggined safari facebook web, it passed else always cacelled return.
anybody help me~
I encounter the same issue today in both the release and development environment. This is not the first time I encounter an issue like this. Here is my checklist
logInWithPermissions(['email'])
to logInWithPermissions(['public_profile'])
so the app could work.Check your AppDelegate.m file.
This code:
if ([[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
]) {
return YES;
}
should be above this code:
if ([RCTLinkingManager application:application openURL:url options:options]) {
return YES;
}
Otherwise, RCTLinkingManager will process the link instead of FBSDK
Check your AppDelegate.m file.
This code:
if ([[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] annotation:options[UIApplicationOpenURLOptionsAnnotationKey] ]) { return YES; }
should be above this code:
if ([RCTLinkingManager application:application openURL:url options:options]) { return YES; }
Otherwise, RCTLinkingManager will process the link instead of FBSDK
Thanks a lot, this helped us, we have had similar issue:
Everything works fine unless you have installed Facebook app on your phone (which I guess most of the people do), FB Login Flow is broken, meaning
And that basically it, like infinite loop which I can only "exit" by exiting whole "flow", thus not being able to Login with FB
I think the underlying issue for us was that we are using WIX RNN and it doesn't play well with this SDK (or maybe this SDK doesn't play well with RNN, anyhow), simply adding these lines solved issue:
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) {
return YES;
}
return NO;
}
(even though we are not using RCTLinkingManager
)
Check your AppDelegate.m file.
This code:
if ([[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] annotation:options[UIApplicationOpenURLOptionsAnnotationKey] ]) { return YES; }
should be above this code:
if ([RCTLinkingManager application:application openURL:url options:options]) { return YES; }
Otherwise, RCTLinkingManager will process the link instead of FBSDK
I have used your code and it is now navigation back to the App but with error "Login Failed".
LoginManager.logInWithPermissions
is failing. Any comments over here?
@creativemind1
I used to have the same issue and fixed it by updating didFinishLaunchingWithOptions
.
https://developers.facebook.com/docs/facebook-login/ios/
Note that you should modify 2 methods in app delegate
It's good working when safari web loggined in facebook.
but didn't login safari web and login with facebook app
throw isCancelled true.
anybody help me?