简体   繁体   English

iOS:-canOpenURL:URL失败:“ fbauth2:/”-错误:“操作无法完成。 (OSStatus错误-10814。)”在模拟器和设备上

[英]iOS: -canOpenURL: failed for URL: “fbauth2:/” - error: “The operation couldn’t be completed. (OSStatus error -10814.)” on Simulators & Devices

I used that Link but I have that error message. 我使用了该链接,但有该错误消息。 Impossible to know why. 不可能知道为什么。 What I want is to have just a button, click on it to share a local image on an iPad, without having the facebook app installed. 我想要的只是一个按钮,单击它即可在iPad上共享本地图像,而无需安装facebook应用程序。 I just want the user click on the button, enter his login/password, post it, and that's all. 我只希望用户单击按钮,输入他的登录名/密码,然后将其发布,仅此而已。

UIImage *image = [UIImage imageNamed:@"..."];

FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
photo.image = image;
photo.userGenerated = YES;
FBSDKSharePhotoContent *content = [[FBSDKSharePhotoContent alloc] init];
content.photos = @[photo];

openUrl method in appDelegate: appDelegate中的openUrl方法:

- (BOOL) application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
    NSLog(@"url recieved: %@", url);
    NSLog(@"query string: %@", [url query]);
    NSLog(@"host: %@", [url host]);
    NSLog(@"url path: %@", [url path]);

      return YES;
}

I precise that there is a problem on the line: 我精确指出在线上存在问题:

[[FBSDKApplicationDelegate sharedInstance] application:application
                         didFinishLaunchingWithOptions:launchOptions];
  • that do an other message error in the console (simulator): 在控制台(模拟器)中执行其他消息错误:
    Falling back to loading access token from NSUserDefaults because of simulator bug 由于模拟器错误,回退到从NSUserDefaults加载访问令牌
    Falling back to storing access token in NSUserDefaults because of simulator bug 由于模拟器错误,回退到在NSUserDefaults中存储访问令牌

  • thant do an other message error in the console (device): 在控制台(设备)中执行其他消息错误:
    Task .<1> finished with error - code: -1001 任务。<1>已完成,错误-代码:-1001

For info, here is my plist keys: 有关信息,这是我的plist键:

<key>CFBundleURLTypes</key>
<array>
    <dict>
    <key>CFBundleURLSchemes</key>
    <array>
        <string>fb2000xxxxxxxxxxx</string>
    </array>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <string>com.newTelApps.WebBoxEssaisPresse</string>
    </dict>
</array>
<key>FacebookAppID</key>
<string>2000xxxxxxxxxxx</string>
<key>FacebookDisplayName</key>
<string>WebBox</string>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbapi</string>
    <string>fb-messenger-api</string>
    <string>fbauth2</string>
    <string>fbshareextension</string>
    <string>fbapi</string>
    <string>twitter</string>
    <string>facebook</string>
    <string>fbapi</string>
    <string>fbapi20130214</string>
    <string>fbapi20130410</string>
    <string>fbapi20130702</string>
    <string>fbapi20131010</string>
    <string>fbapi20131219</string>
    <string>fbapi20140410</string>
    <string>fbapi20140116</string>
    <string>fbapi20150313</string>
    <string>fbapi20150629</string>
    <string>fbauth</string>
    <string>fb-messenger-api20140430</string>
</array>

Thanks in advance. 提前致谢。

go to Info.plist and change App Transport Security Settings ==> Allow Arbitrary Loads to YES 转到Info.plist并将“ App Transport Security Settings ==>“ Allow Arbitrary Loads更改为YES

or 要么

add LSApplicationQueriesSchemes 添加LSApplicationQueriesSchemes

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 -canOpenURL:URL 失败:“fbauth2:/” - 错误:“操作无法完成。(OSStatus 错误 -10814。) - -canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.) 带有firebase canOpenURL的Swift Facebook Auth:URL失败:“ fbauth2:/”-错误:“该操作无法完成。 (OSStatus错误-10814。)” - Swift Facebook Auth with firebase canOpenURL: failed for URL: “fbauth2:/” - error: “The operation couldn’t be completed. (OSStatus error -10814.)” -canOpenURL:URL 失败:“fbauth2:/” - 错误:“操作无法完成。 (OSStatus 错误 -10814。)” SWIFT 5 FBDSKCoreKit 5 - -canOpenURL: failed for URL: “fbauth2:/” - error: “The operation couldn’t be completed. (OSStatus error -10814.)” SWIFT 5 FBDSKCoreKit 5 -canOpenURL:URL失败:“fbauth2:/”(OSStatus错误-10814。)“ - -canOpenURL: failed for URL: “fbauth2:/” (OSStatus error -10814.)" -canOpenURL:URL失败:“fbauth2:/” - 错误:“此应用程序不允许查询方案fbauth2”(OSStatus错误-10814。) - -canOpenURL: failed for URL: “fbauth2:/” - error: “This app is not allowed to query for scheme fbauth2” (OSStatus error -10814.) Xcode8腾讯TIM -canOpenURL:URL失败:“ timapiV1://”-错误:“操作无法完成。(OSStatus错误-10814。) - Xcode8 Tencent TIM -canOpenURL: failed for URL: “timapiV1://” - error: "The operation couldn’t be completed. (OSStatus error -10814.) “comgooglemaps://” - 错误:“操作无法完成。 (OSStatus错误-10814。)“ - “comgooglemaps://” - error: “The operation couldn’t be completed. (OSStatus error -10814.)” 尝试从我的应用程序打开其他应用程序时出现Swift错误| 该操作无法完成。 (OSStatus错误-10814。) - Swift Error when trying to open other apps from my app | The operation couldn’t be completed. (OSStatus error -10814.) -canOpenURL:URL失败:“ fbauth2:/”-iOS 9错误:“(空)”(快速) - -canOpenURL: failed for URL: “fbauth2:/” - error: “(null)” for ios 9 (swift) -canOpenURL:URL失败:“fbauth2:/” - 错误:“(null)” - -canOpenURL: failed for URL: “fbauth2:/” - error: “(null)”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM