iOS Facebook SDK v4.0在共享包含(图像,标题,描述)的帖子时未显示标题和描述

时间:2015-05-06 12:01:57

标签: ios objective-c iphone facebook facebook-graph-api

FBSDKShareOpenGraphObject *object = [[FBSDKShareOpenGraphObject alloc]init];
[object setString:@"digital:milestone" forKey:@"og:type"];
[object setString:@"Title" forKey:@"og:title"];
[object setString:@"Description" forKey:@"og:description"];



if (self.photo) {
    [object setPhoto:self.photo forKey:@"og:image"];
}

FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"digital:celebrate";

[action setObject:object forKey:@"digital:milestone"];

FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"digital:milestone";

FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc] init];
shareDialog.delegate=self;
shareDialog.fromViewController = self;
shareDialog.shareContent = content;
[shareDialog show];

使用上面的代码时,它会将您带到Facebook应用程序并显示仅显示图像的共享实用程序。(标题和描述未显示),

虽然当我按下帖子按钮时,帖子与图片,标题,描述正确共享。问题是共享用户不知道他/她共享的内容enter image description here

0 个答案:

没有答案