-
Notifications
You must be signed in to change notification settings - Fork 971
Description
ISSUE
When i try to share th elocal image (base64 or local path)
it open the facebook app but then suddenly close the story.
here is the code
const uri = await captureRef(viewRefs.current[currentIndex], {
format: 'png',
quality: 1,
result: platform === 'Facebook' ? 'base64' : "tmpfile",
});
const shareOptions = {
backgroundImage: imageUrl,
backgroundBottomColor: Theme.color.COLOR_WHITE,
backgroundTopColor: Theme.color.COLOR_WHITE,
appId: hidden,
social: Share.Social.FACEBOOK_STORIES
}
await Share.shareSingle(shareOptions).catch((error) => {
console.error(`Error sharing via ${platform}:`, error);
});
Expected behavior
It should let me share story with facebook stories options
Actual behavior
Facebook keep on closing.
https://github.com/user-attachments/assets/3248b7eb-e347-438e-8660-2bc798153bc5
Environment
- React Native version:"0.73.0",
- React Native platform + platform version: iOS 18.0,
react-native-share "react-native-share": "^10.2.1",
FIXED
It's not an issue with the package but a restriction from Meta.
To enable the story feature, you need to create an app on Facebook Developer, submit it for review, and provide the required data.
Once approved, use the App ID from Facebook Developer.