【发布时间】:2015-04-08 08:39:20
【问题描述】:
我需要发布一个包含用户生成图像的 OpenGraph 故事,而无需请求任何权限。
我已经按照这里发布的官方教程:https://developers.facebook.com/docs/sharing/opengraph/ios
这是我的代码:
NSDictionary *properties = @{@"og:type": @"minidraw-two.illustration",
@"og:title": @"Illustration",
@"og:description": @"iOS Vector illustration app"};
FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
// Construct an FBSDKSharePhoto
FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
photo.image = image;
photo.userGenerated = YES;
FBSDKShareOpenGraphAction *action = [FBSDKShareOpenGraphAction actionWithType:@"minidraw-two.create" object:object key:@"minidraw-two:illustration"];
[action setPhoto:photo forKey:@"image"];
FBSDKShareOpenGraphContent *content = [FBSDKShareOpenGraphContent new];
content.action = action;
content.previewPropertyName = @"minidraw-two:illustration";
[FBSDKShareDialog showFromViewController:viewController
withContent:content
delegate:self];
发布此内容时,我收到以下错误:
Error Domain=com.facebook.Facebook.platform Code=100 "操作 无法完成。 (com.facebook.Facebook.platform 错误 100。)“ UserInfo=0x174070f00 {error_reason=缺少“类型”或 'fbsdk:create_object' for object: image, error_description=一个错误 共享操作时发生。,app_id=, 错误代码=100}
我不太确定这个错误是什么意思。我检查了 StackOverflow、Facebook 文档,但一无所获。
请指教。
【问题讨论】:
-
嗨@Cristian,有任何更新或解决方案吗?
-
不,遗憾的是什么都没有。我现在唯一的选择是使用非故事图像共享。
标签: ios facebook-graph-api uiimage