You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I implemented facebook sharing, I tried to share a screenshot from my device. The preview of the image to be shared is successfully rendered on the facebook pre-post preview, but when I started to click on "Post" it shows a successful message saying "Shared to facebook", but it is not actually shared.
Expected behavior
It should be posted on my timeline.
Screenshots
none
NOTE
This works on android. But not in iOS
Smartphone:
Device: iPhone 13 Pro
OS: iOS latest
Additional context
ListTile(
leading:constFaIcon(FontAwesomeIcons.facebook),
title:constText('Share on Facebook'),
onTap: () async {
requestStoragePermission();
await screenshotController
.capture(delay:constDuration(milliseconds:10))
.then((image) async {
if (image !=null) {
String fileName =DateFormat('yyyyMMddHHmmss').format(DateTime.now());
final directory =Platform.isIOS
?awaitgetApplicationDocumentsDirectory()
:awaitgetExternalStorageDirectory(); // Use getExternalStorageDirectory insteadfinal imagePath ='${directory!.path}/$fileName.png';
File imageFile =File(imagePath);
try {
// Save the captured image to the deviceawaitFile(imagePath).writeAsBytes(image);
print('Image saved at: $imagePath');
// Check if the file exists after savingif (await imageFile.exists()) {
print('Image file exists after saving');
} else {
print('Image file does not exist after saving');
}
// Share the saved image to FacebookawaitAppinioSocialShare()
.shareToFacebook('', [imagePath]);
} catch (e) {
print('Error saving image: $e');
}
}
});
Navigator.pop(context);
},
),
Info.plist
<key>CFBundleURLTypes</key><array><dict><key>CFBundleURLSchemes</key><array><string>fbf2625472f954a01ec1c88eceaab08e2b</string></array></dict></array><key>LSApplicationQueriesSchemes</key><array><string>instagram</string><string>fb</string><string>fbauth2</string><string>fbshareextension</string><string>fbapi</string><string>facebook-reels</string><string>facebook-stories</string><string>fb-messenger-share-api</string><string>fb-messenger</string><string>tg</string><string>whatsapp</string><string>twitter</string></array><key>NSPhotoLibraryUsageDescription</key><string>$(PRODUCT_NAME) needs permission to access photos and videos on your device</string><key>NSCameraUsageDescription</key><string>$(PRODUCT_NAME) requires access to the camera.</string><key>NSAppleMusicUsageDescription</key><string>$(PRODUCT_NAME) requires access to play music</string><key>FacebookAppID</key><string>395107006792804</string><key>FacebookClientToken</key><string>f2625472f954a01ec1c88eceaab08e2b</string><key>FacebookDisplayName</key><string>Puro - Hearing Test</string><key>NSBonjourServices</key><array><string>_dartobservatory._tcp</string></array>
The text was updated successfully, but these errors were encountered:
Plugin name
Appinio social share
Describe the bug
I implemented facebook sharing, I tried to share a screenshot from my device. The preview of the image to be shared is successfully rendered on the facebook pre-post preview, but when I started to click on "Post" it shows a successful message saying "Shared to facebook", but it is not actually shared.
Expected behavior
It should be posted on my timeline.
Screenshots
none
NOTE
This works on android. But not in iOS
Smartphone:
Additional context
Info.plist
The text was updated successfully, but these errors were encountered: