我的code给您参考,都是些大陆service的集成,没有Google+
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
NSString *urlStr = [url absoluteString];
//Sina Weibo
if ([urlStr hasPrefix:@"wb"] && [WeiboSDK handleOpenURL:url delegate:self]) {
return YES;
}
//Wechat
if ([urlStr hasPrefix:@"wx"] && [WXApi handleOpenURL:url delegate:self]) {
return YES;
}
//Tencent QQ
if ([urlStr hasPrefix: @"tencent"]) {
return [TencentOAuth HandleOpenURL: url];
}
if ([urlStr hasPrefix: @"QQ"]) {
return [QQOpenSDK.sharedSDK handleOpenUrl: url];
}
return NO;
}
※ 引述《starkite (可乐果)》之铭言:
: 其实标题不知道该怎么问....XD
: 因为同时需要fb.google+及微博登入功能
: 但是google+及微博同时用了
: G+
: - (BOOL)application:(UIApplication *)application
: openURL:(NSURL *)url
: sourceApplication:(NSString *)sourceApplication
: annotation:(id)annotation {
: return [GPPURLHandler handleURL:url
: sourceApplication:sourceApplication
: annotation:annotation];
: }
: 微博
: - (BOOL)application:(UIApplication *)application
: openURL:(NSURL *)url
: sourceApplication:(NSString *)sourceApplication
: annotation:(id)annotation {
: return [WeiboSDK handleOpenURL:url delegate:self];
: }
: 请问要如何分开?
: 还是只能这样做呢?
: - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
: {
: if(1){
: return [WeiboSDK handleOpenURL:url delegate:self];
: }else if (2){
: return [GPPURLHandler handleURL:url
: sourceApplication:sourceApplication
: annotation:annotation];
: }
: }