facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 906 forks source link

LoginManager.logInWithPermissions not works if pass user_posts as one of the permissions #771

Open atlkuk opened 4 years ago

atlkuk commented 4 years ago

🐛 Bug Report

Hi, When I try to login with LoginManager.logInWithPermissions I pass 'public_profile', 'email', 'user_friends', 'user_likes', 'user_posts' permissions (obviously all verified from facebook app review).

If i remove user_posts all seems to be ok but I need it so if I add it the sdk returns me an error saying that "the app requests an invalid permission".

Is there any kind of problem here?

How can I fix it?

Thanks

To Reproduce

To reproduce the issue call this function

LoginManager.logInWithPermissions([
        'public_profile',
        'email',
        'user_friends',
        'user_likes',
        'user_posts'
])
                .then(
                    (result) => {
                        resolve({
                            success: true,
                            data: result
                        });
                    },
                    (error) => {
                        resolve({
                            success: false,
                            showMessage: true
                        });
                    }
                ).catch(error => {
                    resolve({
                        success: false,
                        showMessage: false
                    });
                });

Expected Behavior

Entering in result callback

Environment

react: ^16.11.0 => 16.11.0 react-native: ^0.62.2 => 0.62.2 react-native-fbsdk: 2.0.0

dannnnthemannnn commented 4 years ago

I am having the same exact issue but in the flutter sdk. (https://github.com/roughike/flutter_facebook_login)

alyn3d commented 3 years ago

Having the same issue with: "react-native-fbsdk": "3.0.0" "react-native": "0.63.3" "react": "16.13.1"

Any solutions?