javascriptreact-nativereact-native-fbsdk

Invalid permission "user_posts" in react-native-fbsdk although it is approved by review


Simple. I've built a login flow that uses Facebook authentication for my app.

LoginManager.logInWithPermissions(["public_profile", "email"])

this has no issues, and proceeds to log the user in.

If instead I put in:

LoginManager.logInWithPermissions(["public_profile", "email", "user_posts"])

it throws an error

Login fail with error: Error: SERVER_ERROR: [code] 1349013 [message]: The app requested an invalid permission.

Permission is valid, and approved by app review. I can't seem to find a workaround or fix. There is even an issue in react-native-fbsdk package

Has anyone else encountered this issue? Any solutions?


Solution

  • Took me a while, but the solution is "simple" enough.

    Instead of using react-native-fbsdk module you can switch to expo-facebook module.

    Add react-native-unimodules. Documentation available here

    After that add expo-facebook. Documentation available here