繁体   English   中英

本地UIImage不在打开图故事Facebook中显示

[英]Local UIImage not show in open graph story Facebook

我尝试在Facebook开放图故事中发布本地照片,但未显示该图像。

在此处输入图片说明

此代码与Facebook开发人员的文档页面相同。 facebook_developers打开图iOS

FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
photo.image = [UIImage imageNamed:@"coffee-and-sunrise.jpg"];
// Optionally set user generated to YES only if this image was created by the user
// You must get approval for this capability in your app's Open Graph configuration
// photo.userGenerated = YES;

// Create an object
NSDictionary *properties = @{
                                @"og:type": @"books.book",
                                @"og:title": @"A Game of Thrones",
                                @"og:description": @"In the frozen wastes to the north of Winterfell, sinister and supernatural forces are mustering.",
                                @"books:isbn": @"0-553-57340-3",
                            };

FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];

// Create an action
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"books.reads";
[action setObject:object forKey:@"books:book"];

// Add the photo to the action. Actions
// can take an array of images.
[action setArray:@[photo] forKey:@"image"];

// Create the content
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"books:book";

[FBSDKShareDialog showFromViewController:self
                  withContent:content
                  delegate:nil];

Facebook知道这在iOS上已损坏,并将其标记为“无法修复”。 令人难以置信的令人不安,请在他们在此处确认的错误报告中表达您的关注。

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM