Handling openURL: with Facebook and Google

后端 未结 10 1599
长情又很酷
长情又很酷 2021-01-01 09:39

user in my app can login using 2 services : Facebook or Google

everything works fine, however, in the :

- (BOOL)application:(UIApplication *)applicat         


        
10条回答
  •  囚心锁ツ
    2021-01-01 10:15

    We don't need to Explicitly need to check the URL, below code does it :-

    - (BOOL)application: (UIApplication *)application openURL: (NSURL *)url sourceApplication: (NSString *)sourceApplication annotation: (id)annotation
    {
    
        if ([GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation]) {
            return YES;
        }else if([FBAppCall handleOpenURL:url sourceApplication:sourceApplication]){
            return YES;
        }
    
        return NO;
    }
    

提交回复
热议问题