我为我的iOS应用程序创建了一个Facebook应用程序,并设置了正确的应用程序ID和URL方案处理。我还创建了一个Open Graph Story,其中包含一个Action(称为“create”)和一个Object。对象是Facebook的Common Type video.other对象。
要使用最新的(4.0+)API进行测试,我使用以下代码发布(成功,只是没有视频内容):
NSDictionary *properties = @{
@"og:type": @"video.other",
@"og:title": @"Test title",
};
FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"myappnamespace:create";
[action setObject:object forKey:@"video:other"];
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"video:other";
[FBSDKShareDialog showFromViewController:self withContent:content delegate:self];
是否有办法附加视频数据,而不仅仅是外部托管视频的网址?