thebergamo / react-native-fbsdk-next

MIT License
692 stars 166 forks source link

Post show on facebook public but none of my friend can see my post #569

Closed ibaad-art closed 3 weeks ago

ibaad-art commented 1 month ago

I’m using the react-native-fbsdk-next library in my React Native app to share posts to my Facebook News Feed. The post is successfully shared, and it shows as "Public" on the News Feed. However, none of my friends can see the post, even though it appears as public on my end.

mikehardy commented 1 month ago

Very strange, given the post actually shared and it appears as public, this sounds like "facebook servers are doing something strange" vs "this repository has an issue"

You don't indicate versions or exactly how to reproduce with code or anything so there's not much to go on either way

I suggest you look into the issues lists for the specific SDK you can reproduce this on (ios at facebook-ios-sdk or android at facebook-android-sdk) and inquire there, since we are just wrapping their SDKs in the most minimal way possible here

ibaad-art commented 3 weeks ago

before this you have get permission access from facebook by using below code :

try {
      const result = await LoginManager.logInWithPermissions([
        'user_photos',
        'user_videos',
      ]);

      if (result.isCancelled) {
        dispatch({ type: 'notGranted' });
        console.log('Permission request cancelled');
      } else {
        const data = await AccessToken.getCurrentAccessToken();
        console.log('Permission request granted', data);
        iscliked.current = true
        dispatch({ type: 'Granted' });
      }
    } catch (error) {
      dispatch({ type: 'notGranted' });
      console.error('Error requesting permissions:', error);
    }

after that you can share post publicly and all the world can see your post

mikehardy commented 3 weeks ago

Ah - permission required, that makes sense. Thanks for updating the issue hopefully it helps other people