这不再适用于分享图像。图像不会显示在FB弹出窗口中,也不会发送到FB。该图像有效,相同的代码适用于Twitter。是否有一些新的解决方法能够将图像共享到Facebook?
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
{
SLComposeViewController *composeController = [SLComposeViewController
composeViewControllerForServiceType:SLServiceTypeFacebook];
[composeController setInitialText:@"whatever"]; //this doesn't work either
[composeController addImage:self.shareImageView.image];
[composeController addURL:[NSURL URLWithString:@"https://whatever"]];
SLComposeViewControllerCompletionHandler completionBlock = ^(SLComposeViewControllerResult result){
if (result == SLComposeViewControllerResultDone) {
//done
}
};
composeController.completionHandler = completionBlock;
[self presentViewController:composeController
animated:YES completion:nil];
}
编辑:如果我删除addURL:
,它就可以了。那么有没有办法与URL共享图像?
答案 0 :(得分:0)
检查出来:https://developers.facebook.com/docs/apps/review/prefill
"将您自己的内容添加到用户手动输入的内容中。这包括主题标签,超链接或URL。"被视为违规行为。