我正在创建FBSDKShareLinkContent对象并将其输入FBSDKShareDialog。我正在尝试将对话框的默认消息设置为“我的高分是%d !”。共享本身是有效的,默认情况下有一个空消息。有人能帮忙吗?
谢谢!
编辑:这是我的代码:
FBSDKShareLinkContent* content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = [NSURL URLWithString: @"https://itunes.apple.com/us/app/cylinder-game"];
content.contentTitle = @"Cylinder Game";
content.contentDescription = @"Cylinder Game is endless, rhythm based game with super addictive gameplay";
FBSDKShareDialog* dialog = [[FBSDKShareDialog alloc] init];
[dialog setMode:FBSDKShareDialogModeAutomatic];
[dialog setShareContent:content];
[dialog setDelegate:self];
[dialog setFromViewController:UnityGetGLViewController()];发布于 2015-03-31 00:10:45
无法使用SDK提供的共享对话框设置默认消息。它也被认为是预填充,并且是违反Facebook平台策略的,参见第2.3节https://developers.facebook.com/policy
发布于 2016-08-30 08:28:44
我发现标题和描述无论如何都与url对象有关。这意味着,用户在共享对话框中看到的对象上方的消息文本似乎不会受到影响。
并且,只有当您将对话模式设置为本机或FBSDKShareDialogModeFeedBrowser时,URL对象的标题和描述符才能工作。
dialog.mode = FBSDKShareDialogModeNative;
if (![dialog canShow]) {
dialog.mode = FBSDKShareDialogModeFeedBrowser;
}另一件事是,FBSDKShareLinkContent有一些名为“”的属性,它在URL对象的上方和消息本身下显示一些文本,但并不是在所有模式下都显示。例如,不是在本机,而是在FBSDKShareDialogModeFeedBrowser。
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = [NSURL URLWithString:@"http://www.x.com"];
content.contentDescription = @"desc";
content.contentTitle = @"title";
content.quote = @"quote";https://stackoverflow.com/questions/29349060
复制相似问题