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应用程序并显示仅显示图像的共享实用程序。(标题和描述未显示),
虽然当我按下帖子按钮时,帖子与图片,标题,描述正确共享。问题是共享用户不知道他/她共享的内容