Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Submit permission for Live mode #825

Open
binhchili opened this issue Dec 28, 2020 · 0 comments
Open

Submit permission for Live mode #825

binhchili opened this issue Dec 28, 2020 · 0 comments

Comments

@binhchili
Copy link

binhchili commented Dec 28, 2020

I already integrated react-native-fbsdk library for my app and created a Facebook developer app for long ago. Now I need to switch my app to live mode but it require some permissions verification for my App. My app allow users to log in with Facebook and it only needs email , avatar and id of Facebook user. Here is my code for that permission :

LoginManager.logInWithPermissions(["public_profile", "email"]).then(
            function (result) {
                setProcess(false);
                if (result.isCancelled) {
                    console.log("Login cancelled");
                } else {

                    setTokenFb(true);
                }

            },
            function (error) {
                console.log("Login fail with error: " + error);
                setProcess(false);

            }
        ).catch(e => {
            setProcess(false);
            console.log(e);
           
        });

 useEffect(() => {
        if (tokenFb) {
            AccessToken.getCurrentAccessToken().then(data => {
                if (data) {
                    setAccessToken(data.accessToken);

                } else {
                    setProcess(false);
                    setAccessToken('none');
                }
            });
        }

    }, [tokenFb]);

const infoRequest = new GraphRequest(
        '/me?fields=picture', {
        accessToken: accessToken,
        parameters: {
            fields: {
                string: 'email,name,picture.height(480)'
            }
        }
    }, responseCallback,
    );

const responseCallback = (error, result) => { // handle callback 
        if (error) {
            // console.log('Error fetching data: ' + error.toString());
        } else {

            //console.log('Avatar: ' + result.picture.data.url);
            setUserInfo({ ...result, loginType: 'facebook' });
        }
    }


useEffect(() => {
        if (accessToken !== 'none') {
            new GraphRequestManager().addRequest(infoRequest).start();
        }
    }, [accessToken]);

My question is: Do I need to submit request approval for more permissions for my app ? In my Facebook developer account I already have 2 permissions by default (image below), but I still doubt about these permission
.
image

EDIT
My app also allow user to share some link on Facebook and I don't know whether it requires permission or not

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant