SLServiceTypeFacebook setInitialText不起作用 [英] SLServiceTypeFacebook setInitialText is not working
问题描述
我正在尝试在IOS 8.3上使用SLServiceTypeFacebook在Facebook上分享文本。但弹出文本框显示为空。我希望它在文本中显示。下面你可以看到我用的代码。
I am trying to share a text on Facebook with SLServiceTypeFacebook on IOS 8.3. But the popup text box displayed empty. I want it to be displayed with text in it. Below you can see the code I use for that.
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
{
SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[controller setInitialText:@"First post from my iPhone app"];
[self presentViewController:controller animated:YES completion:Nil];
}
推荐答案
这似乎是一个问题安装了最新的Facebook应用更新(v29)。删除它修复了问题。
It seems to be a problem having installed the latest Facebook app update (v29). Removing it "fixes" the problem.
https ://developers.facebook.com/bugs/1632385646995079/
https:/ /developers.facebook.com/bugs/962985360399542/
更新(2015年6月3日)
好吧。似乎新的Facebook政策说通过 setInitialText:
预先填写邮件是违规前的。
Well. It seems that the new Facebook policy says that prefilling a message through setInitialText:
is a prefill violation.
https://developers.facebook.com/docs/apps/review/prefill
所以我想从现在开始分享内容的唯一方法是 FBSDKShareDialog
So I guess the only way to share content from now on is the FBSDKShareDialog
https://developers.facebook.com/docs/sharing/ios
这篇关于SLServiceTypeFacebook setInitialText不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!