当我使用SLComposerViewController在Facebook上分享iTunes网址时,Facebook上的帖子没有显示链接描述。如果我尝试其他URL,那么我的帖子显示链接描述。
答案 0 :(得分:0)
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {
SLComposeViewController *mySLComposerSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[mySLComposerSheet addImage:[UIImage imageNamed:@"s_720.jpg"]];
[mySLComposerSheet setInitialText:@"check my swap card..."];
[mySLComposerSheet addURL:[NSURL URLWithString:[swap_card_dict valueForKey:@"swapcard_url"]]];
[mySLComposerSheet setCompletionHandler:^(SLComposeViewControllerResult result) {
switch (result) {
case SLComposeViewControllerResultCancelled:
NSLog(@"Post Canceled");
break;
case SLComposeViewControllerResultDone:
{
NSLog(@"Post Sucessful");
}
break;
default:
break;
}
}];
[[self viewController] presentViewController:mySLComposerSheet animated:YES completion:nil];
}