【问题标题】:Local UIImage not show in open graph story Facebook本地 UIImage 未显示在打开的图形故事 Facebook 中
【发布时间】:2016-05-16 17:41:17
【问题描述】:

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

此代码与 Facebook 开发人员的文档页面相同。 facebook_developers open graph 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];

【问题讨论】:

    标签: ios objective-c facebook uiimage facebook-opengraph


    【解决方案1】:

    Facebook 知道这在 iOS 上已损坏,并将其标记为“无法修复”。令人难以置信的激动,请对他们承认的错误报告表达您的担忧here。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-12
      • 1970-01-01
      • 2015-08-21
      • 2013-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多