当我追加我的网址时,我的Facebook共享问题(包括社交框架)。
我用于在Facebook上分享内容的代码:
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook
])
{
SLComposeViewController *fbSheetOBJ = [SLComposeViewController
composeViewControllerForServiceType:SLServiceTypeFacebook
];
[fbSheetOBJ setInitialText:@""];
[fbSheetOBJ addURL:[NSURL URLWithString:[[dict_BusinessDetails valueForKey:@"shared_lnks"] valueForKey:@"facebook_link"]]];
[fbSheetOBJ addURL:[NSURL
NSURL *imageURL = [NSURL URLWithString:[dict_BusinessDetails valueForKey:@"business_logo"]];
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
[fbSheetOBJ addImage:[UIImage imageWithData:imageData]];
[self presentViewController:fbSheetOBJ animated:YES completion:nil];
}
只有iOS设备出现问题,模拟器一切正常。
答案 0 :(得分:0)
insted of
fbSheetOBJ.addImage(UIImage.imageWithData(imageData))
尝试使用:
bSheetOBJ.addImage(UIImage.pin_decodedImageWithData(imageData))