HTTPS图像网址未使用FBSDKShareOpenGraphObject加载到FBSDKShareDialog中

时间:2016-08-15 17:14:43

标签: ios facebook https self-signed fbsdk

我正在尝试使用FBSDKShareDialog将图片网址发布到Facebook。图像网址具有https,并使用自签名证书。但https图片网址在发布到Facebook之前和之后都没有呈现。以下是我在Facebook上分享的代码:

NSURL *imageURL = [NSURL URLWithString:url];
    FBSDKSharePhoto *photo = [FBSDKSharePhoto photoWithImageURL:imageURL userGenerated:NO];
    // Create an object
    NSDictionary *properties = @{
                                 @"og:type": @"fit:class",
                                 @"og:title": sliceClass.className,
                                 @"og:description": desc,
                                 @"og:url": myURL,
                                 @"og:image": @[photo]
                                 };
    FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];

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

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

    [[FBSDKShareAPI shareWithContent:content delegate:nil] share];


    FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc] init];
    shareDialog.fromViewController = vc;
    shareDialog.shareContent = content;
    [shareDialog setShareContent:content];
    [shareDialog setFromViewController:vc];
    [shareDialog show];

非常感谢任何帮助。

0 个答案:

没有答案