更新了twitter3.0后分享中的东西重新配置,代码修改后测试发现,有的手机分享成功,有的到了授权界面点击连接后就返回错误403,对着官网一看
- (BOOL)handleOpenUrl:(NSURL *)url application:(UIApplication *)app sourceApplication:(id)sourceApplication annotation:(id)annotation {
NSString *urlStrl = [url absoluteString];
BOOL handle = YES;
if ([urlStrl hasPrefix:@"tencent"]) {
handle = [TencentOAuth HandleOpenURL:url];
}else if ([urlStrl hasPrefix:@"wx"]){
handle = [WXApi handleOpenURL:url delegate:self];
}else if ([urlStrl hasPrefix:@"wb"]){
handle = [WeiboSDK handleOpenURL:url delegate:self];
}else if ([urlStrl hasPrefix:@"fb"]){
if ([[[UIDevice currentDevice] systemVersion] floatValue] > 9.3) {
handle = [[FBSDKApplicationDelegate sharedInstance] application:app
openURL:url
sourceApplication:sourceApplication[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:sourceApplication[UIApplicationOpenURLOptionsAnnotationKey]];
}else{
handle = [[FBSDKApplicationDelegate sharedInstance] application:app
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
}else if ([urlStrl hasPrefix:@"twitter"]){
handle = [[Twitter sharedInstance] application:app openURL:url options:sourceApplication];
}
return handle;
}
handle = [[Twitter sharedInstance] application:app openURL:url options:sourceApplication]; 这里options传了annotation(上级方法中annotation是nil),所以应该是授权回调就没有成功
能分享成功的应该是因为之前2.0授权过,到这边不用授权直接就分享出去了