- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
执行这段代码时
FBSDKShareDialog *dialog = [[FBSDKShareDialog alloc] init];
dialog.fromViewController = viewController;
dialog.shareContent = content;
dialog.mode = FBSDKShareDialogModeFeedWeb;
dialog.delegate = self;
[dialog show];
应用程序在 [dialog show] 崩溃;使用此堆栈跟踪:
0 CoreFoundation 0x2b9effa7 <redacted> + 150
1 libobjc.A.dylib 0x3a0a0c8b objc_exception_throw + 38
2 CoreFoundation 0x2b9f53a9 <redacted> + 0
3 CoreFoundation 0x2b9f32c7 <redacted> + 714
4 CoreFoundation 0x2b922ba8 _CF_forwarding_prep_0 + 24
5 uCiC 0x003cf1ef +[FBSDKInternalUtility isBrowserURL:] + 22
6 uCiC 0x0044c9f5 +[FBSDKShareUtility _validateNetworkURL:name:error:] + 64
7 uCiC 0x0044b17d +[FBSDKShareUtility validateShareLinkContent:error:] + 176
8 uCiC 0x0044ad71 +[FBSDKShareUtility validateShareContent:error:] + 284
9 uCiC 0x004433ad -[FBSDKShareDialog validateWithError:] + 84
10 uCiC 0x004431c5 -[FBSDKShareDialog show] + 36
11 uCiC 0x002028c7 -[ICSocialSharer fbSharingInAppWebViewContent:inViewController:] + 306
12 uCiC 0x002031f5 -[ICSocialSharer fbSharingForPostModel:inViewController:] + 2316
13 uCiC 0x00203549 -[ICSocialSharer postMessageForModel:socialNetwork:inViewController:] + 568
14 uCiC 0x000ea2e5 -[PostFotoViewController postSocial:] + 1528
15 UIKit 0x2f0a2c4b <redacted> + 70
16 UIKit 0x2f0a2bf1 <redacted> + 44
17 UIKit 0x2f08d7e3 <redacted> + 582
18 UIKit 0x2f0a265d <redacted> + 588
19 UIKit 0x2f0a2337 <redacted> + 522
20 UIKit 0x2f09bc11 <redacted> + 544
21 UIKit 0x2f071e05 <redacted> + 196
22 UIKit 0x2f2e86fb <redacted> + 14414
23 UIKit 0x2f070819 <redacted> + 1352
24 CoreFoundation 0x2b9b5d8f <redacted> + 14
25 CoreFoundation 0x2b9b519f <redacted> + 218
26 CoreFoundation 0x2b9b3805 <redacted> + 772
27 CoreFoundation 0x2b8fff31 CFRunLoopRunSpecific + 476
28 CoreFoundation 0x2b8ffd43 CFRunLoopRunInMode + 106
29 GraphicsServices 0x333da201 GSEventRunModal + 136
30 UIKit 0x2f0d1879 UIApplicationMain + 1440
31 uCiC 0x0010d07d main + 108
32 libdyld.dylib 0x3a652aaf <redacted> + 2
原因是:'-[__NSCFString 方案]:无法识别的选择器发送到实例 0x187a8030'。
自从我们使用 iOS9 构建后就会发生这种情况。
现在,plist 包含适用于 FaceBookSDK 4.6 的正确方案,并且允许 AppTranspotPolicy。
你们知道如何解决这个问题吗?
谢谢,D.
最佳答案
显然 Facebook 不会检查内容 url 是否真的是 url,即使对象是 NSString,他们也会调用 [NSURL scheme]。
所以内容图片 url 是这样写的,编译器没有任何警告或问题:
content.imageURL = [sharedData valueForKey:@"link"]; //which is an NSString
然后把它变成这样的 NSURL
content.imageURL = [NSURL URLWithString:[sharedData valueForKey:@"link"]];
一切似乎都正常。
非常糟糕,因为编译器没有报错,但应用程序在运行时崩溃了。我还将在 Facebook 上提交错误。
PS:我在这里为任何遇到此问题的人写了这篇文章。
关于ios - FBSDKShareDialog 崩溃 : [__NSCFString scheme],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32743074/
我正在使用 PLT 方案 (DrScheme)。我想加载从 here 获得的文件.要加载文件,我进入 PLT Scheme 并在交互窗口(或底部窗口)中输入(加载“simply.scm”),然后按 E
根据我的阅读,Scheme 中的符号不区分大小写 - 即 (eq? 'Hello 'hello) 评估为 #t (因为两者都由符号 'hello 表示,并且 scheme 具有两个具有相同名称的符
我正在尝试在 Scheme 中完成一个有限状态机。问题是,我不确定如何告诉它应该测试哪些字符。如果我想测试字符串“abc112”,我该怎么做? 代码如下: #lang racket (defin
我正在尝试做我的家庭作业,并通过一些示例代码进行破解,我看到了这一行: [(:+ (:or VAR)) (token-VAR (string->symbol lexeme))] 这是来自计算器中
我在 MIT/GNU Scheme 中运行了这个: (define x (+ 2 3)) 然后解释器打印: ;Value: x 但是根据我的教科书,define 表达式返回的值应该是未定义的。为什么解
考虑以下定义数字树的 BNF。请注意,树可以是叶子、具有一个子树的节点 1 或节点 2有两个子树。 tree ::= (’leaf number) | (’node-1 tree) | (’node-
(show-data 'YHOO :config 'my-config) 我看到了一些 Scheme 代码(在 Guile 中),如上面的行,并且对 colon 语法 :config 感到困惑。 这有
我目前正在尝试理解方案中流的概念。例如,我应该编写一个函数 fibonacci,它返回斐波那契数作为流表示形式。 函数的期望输出/用法如下所示: > (define a (finbonacci)) >
我想创建一个可以确定方案中任意函数定义的函数。如果我们将这样的函数称为“定义”,它会这样工作: (define (triple x) (* 3 x)) (definition triple) woul
在 Common Lisp 中,当我想根据 Common Lisp 实现使用不同的代码片段时,我可以使用 *features* 和提供的 #+ 和 #- 符号来检查给定功能的可用性并相应地进行。例如(
我正在学习 Scheme,具有 C/C++ 背景。我非常习惯于将相关的值组合到结构中,而且我发现 Scheme 的记录在这方面工作得很好。 如果发现自己经常这样做以避免函数体中的视觉噪音: (defi
在 Scheme R7RS 中,有 load 和 include 两种形式。 包含描述为: Semantics: Both include and include-ci take one or mor
我无法理解 Scheme 中收集器函数的使用。我正在使用“The Little Schemer”一书(Daniel P. Friedman 和 Matthias Felleisen 着)。一个带有一些
我知道您可以使用 (read) 来获取用户输入的表达式,但是 (read) 只会获取第一个表达式,然后对任何内容进行评估。我想知道是否有任何方法可以读取整行用户输入,也许将所述行转换为列表? (let
我正在重新熟悉 Scheme,我遇到了一个问题,这可能反射(reflect)了我的根本误解。 假设我在 Scheme 中执行以下操作(在这种情况下使用 Guile,但在 Chicken 中也是如此):
这是我目前正在自学的链接 Scheme,http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-1.html 据作者介绍, 然后我尝试了
假设我有这样的事情: (define pair (cons 1 (lambda (x) (* x x)) 如果我想返回这对的前对象,我会这样做: (car pair) 它返回 1。但是当对象是一个过程
我编写了以下示例,以尝试在 Chibi Scheme 0.5.3 中使用 R7RS 库: (define-library (example hello) (export hello-world
CODE SNIPPET 1 和 CODE SNIPPET 2 有什么区别? ;CODE SNIPPET 1 (define i 0) (do ()
长度为 n 的 k 元项链是一个长度为 n 的有序列表,其项目是从长度为 k 的字母表中抽取的,它是所有共享轮换排序的列表中按字典顺序排列的第一个列表。 例子: (1 2 3) 和 (1 3 2) 是
我是一名优秀的程序员,十分优秀!