Skip to content

Share with FACEBOOK STOREIS not working #1578

@daniyalrathore14

Description

@daniyalrathore14

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions