I am getting issue for Facebook sharing (with social framework) on when i am appending my URL.
Its giving error on Facebook page.
Code which i am using for sharing content on 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];
}
Issue with only iOS devices, Everything is working fine with simulator.
insted of
fbSheetOBJ.addImage(UIImage.imageWithData(imageData))
try using:
bSheetOBJ.addImage(UIImage.pin_decodedImageWithData(imageData))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.