
[FBRequestConnection startForUploadStagingResourceWithImage:image completionHandler:^(FBRequestConnection *connection,ID result,NSError *error) { if (!error){ Nsstring *uri = [result valueForKey:@"uri"]; NSMutableDictionary<FBOpenGraphObject> *object = [FBGraphObject openGraphObjectForPost]; object.provisionedForPost = YES; object[@"type"] = @"myapp:Quote"; object[@"image"] = uri; object[@"Title"] = @"Check out my quote"; [FBRequestConnection startForPostopenGraphObject:object completionHandler:^(FBRequestConnection *connection,NSError *error) { if(error) { NSLog(@"Error: %@",error); } else { Nsstring *graPHPath = [Nsstring stringWithFormat:@"me/quotestagramapp.quote"]; [FBRequestConnection startForPostWithGraPHPath:graPHPath graphObject:object completionHandler:^(FBRequestConnection *connection,NSError *error) { if (error){ NSLog(@"Error is %@",[error description]); } else { NSLog(@"Successful"); } }]; } }]; } else { NSLog(@"Error uploading image to fb staging"); } }]; 但是我收到一个错误然后应用程序在我的startForPostWithOpenGraPHPath中崩溃了.
这是错误:
*** Terminating app due to uncaught exception 'NSinvalidargumentexception',reason: '-[__NSCFBoolean dataUsingEnCoding:]: unrecognized selector sent to instance 0x3a9be530'*** First throw call stack:(0x3261c2a3 0x3a34497f 0x3261fe07 0x3261e531 0x32575f68 0x1e9ac1 0x1e9b8d 0x1eb521 0x1ec639 0x1eca19 0x1eb28d 0x1ea0f9 0x1eac49 0x1e5ca5 0x110ecb 0x1edc11 0x1ece77 0x1eaebf 0x1ef3af 0x1ef2e9 0x1ef923 0x32f576fd 0x32e971f9 0x32e97115 0x322f945f 0x322f8b43 0x32320fcb 0x3256274d 0x3232142b 0x3228503d 0x325f1683 0x325f0ee9 0x325efcb7 0x32562ebd 0x32562d49 0x3613b2eb 0x34478301 0x109bb1 0xfd3b8)libc++abi.dylib: terminate called throwing an exception解决方法 在startForPostWithGraPHPath中,您传递的是刚创建的“对象”,但是,您无法将其作为开放图形 *** 作的一部分传递.您应该做的是查看返回的“结果”,从中获取“ID”,并使用以下内容构造NSDictionary(或FBOpenGraphObject):
@ {@“quote”:objectID}
其中objectID是第一篇文章结果中的“ID”.
总结以上是内存溢出为你收集整理的使用FBRequest在Facebook 3.5 iOS SDK中发布打开图表 *** 作时出错全部内容,希望文章能够帮你解决使用FBRequest在Facebook 3.5 iOS SDK中发布打开图表 *** 作时出错所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)