Closed jakobheb closed 1 year ago
Hey @jakobheb , you have to pass the image path from your device's storage not the asset path.
you can use image picker or any other plugin to pick media from the device or capture a pic and share.
Even if I add the absolute path of an image, it is showing black screen
Hey @jakobheb , I tried to reproduce it but it worked fine for me.
Could you please try using the below code and make sure the issue is in social share plugin.
XFile? xFile = await ImagePicker.platform.getImage(
source: ImageSource.gallery,
);
if (xFile != null) {
String path = xFile.path;
shareToInstagram(path);
}
}
Future<void> shareToInstagram(String filePath) async {
await appinioSocialShare.shareToInstagramStory(
backgroundImage: filePath,
stickerImage: filePath,
);
}
The images are not shown and a grey screen appears in the story section.
Any ideas how to solve that
Future<void> shareToInstagram(String message, String filePath) async { await appinioSocialShare.shareToInstagramStory(backgroundImage: "assets/restaurants/habaneros.jpg", backgroundBottomColor: "", backgroundTopColor: "", backgroundVideo: "", stickerImage: ""); }