[英]Unable to set initialtext in ios9 in native facebook share dialog
我正在尝试将初始文本设置为iOS 9中的SLComposeViewController,但是它在对话框中显示为空白。
这是我的代码。
SLComposeViewController *composeController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
NSString *initialText = @"Tesing text issue.";
if (initialText != Nil)
{
[composeController setInitialText:initialText];
}
dispatch_async(dispatch_get_main_queue(), ^
{
//show progress hud here
[self presentViewController:composeController animated:YES completion:nil];
});
我也在另一个共享应用程序中检查了这个,他们也有同样的问题。 有人可以在这里解决任何问题吗?
Facebook已弃用该API,以便在共享时以编程方式设置初始文本。 以下是参考:
希望这可以帮助。
您可以使用图形API和自定义共享对话框设置初始文本。 https://developers.facebook.com/docs/sharing/opengraph/ios#custom
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.