2015-12-16 22 views
0

我想发布包含应用程序链接的开放图故事。Facebook打开图故事 - 用户生成的照片的标题和应用程序链接

设置我的故事与下列代码 -

NSDictionary *properties = @{ 
    @"og:type": @"bcskitracker:tour",  
    @"og:title": tour.route.name, 
    @"og:distance": [tour.distance stringValue], 
    @"og:vertical": [tour.ascent stringValue], 
    @"og:description": @"description", 
    @"og:url": @"https://fb.me/786890254772699", 
    @"og:image": photo 
}; 
FBSDKShareOpenGraphObject *tourObject = [FBSDKShareOpenGraphObject objectWithProperties:properties]; 
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init]; 
action.actionType = @"bcskitracker:ski"; 
[action setObject:tourObject forKey:@"bcskitracker:tour"]; 
[action setString:@"true" forKey:@"fb:explicitly_shared"]; 
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init]; 
content.action = action; 
content.previewPropertyName = @"bcskitracker:tour"; 
[FBSDKShareAPI shareWithContent:content delegate:self]; 

如果照片被标记为userGenerated:NO,与标题所期望的故事出版,如果点击后它会打开iPhone应用:

enter image description here

但是只可以显示一张照片,并显示在iPhone上非常小。如果我标记的照片作为userGenerated:YES后显示的大照片,但没有标题,没有应用程序的链接(只链接到Facebook的应用程序目录) -

enter image description here

的职位甚至不显示故事模板中构建的游览标题 - enter image description here

是否有任何方法将用户生成的照片添加到标题和应用程序链接?我知道我可以设置action.message,但这是受限制的,并没有链接到应用程序。

回答

0

这是目前的预期行为;如果您将照片附件设置为user_generated = yes,则会将其视为照片上传。在这种情况下,您不能混合使用Open Graph信息。因此,这两个:)

你可以做一个,就是与两个地图,并上传照片您的服务器端生成图像。如果您使用它作为您的og:image,它将包含在帖子中。

+0

谢谢,这是我怀疑的。我曾尝试尝试使用合成照片,但是iPhone上的图像很小,看起来很糟糕。希望facebook能够在未来实现更大的灵活性。 – David

相关问题