user in my app can login using 2 services : Facebook or Google
everything works fine, however, in the :
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation: (id)annotation {
...
}
i should decide to call the Facebook callback or Google callback
if the user has the apps, its easy, than i decide by the sourceApplication
but when not (no native Facebook account linked in, no FB app, no GooglePlus app), it links to the browser :( and i dont know if it is comming from Facebook or Google
is there a way how to decide what to call? like
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation: (id)annotation {
// how to decide?
if (facebook) {
return [FBSession.activeSession handleOpenURL:url];
} else if (google) {
return [GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation];
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…