내 OGOStory (OpenGraphObjectStory)에 대해 "조정"설정을 관리 했으므로 괜찮은 대화 상자에 올바르게 표시됩니다. 내 앱에는 이야기과 OGOS라는 모델이 있지만, 이해하기 쉽습니다.
- (void)performShareFacebookWithStory:(STLStory *)story andText:(NSString *)text
{
NSURL *imageURL = [NSURL URLWithString:[story largeImageURL]];
FBSDKSharePhoto *photo = [FBSDKSharePhoto photoWithImageURL:imageURL userGenerated:NO];
NSDictionary *properties = @{
@"og:type": @"stories_california:story", //OpenGraphObjectStory,
@"og:title": [story title],
@"og:description": [story aboutText],
@"og:url": [self storyUrlForStory:story], // it's NSString
@"og:image": @[photo],
};
FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"stories_california:story_listen";
[action setObject:object forKey:@"story"];
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"story"; //OpenGraphPreviewPropertyName
[FBSDKShareDialog showFromViewController:_parentVC
withContent:content
delegate:self];
}