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 908 forks source link

Facebook Login Error coming on android #678

Open SudeshRani opened 4 years ago

SudeshRani commented 4 years ago

when i try to login with facebook it gives me an error: server_error: [code] 1675030 [message]: error performing query. Please help

AshishCd commented 4 years ago

@SudeshRani have you able to open the popup and are you getting the access token?

SudeshRani commented 4 years ago

LoginManager.logInWithPermissions(["email","public_profile" ]).then( function (result) { alert('result--'+JSON.stringify(result)) AccessToken.getCurrentAccessToken().then( (data) => { console.log(data.accessToken.toString()) const {accessToken} = data fetch('https://graph.facebook.com/me?fields=id,name,email,first_name,picture,last_name,gender,birthday&access_token=' + accessToken) .then((response) => response.json()) .then((json) => {

          alert('the facebook data is ' + JSON.stringify(json));

        })
        .catch(() => {

        })
}

)

} , function (error) {

 alert('Login fail with error: ' + error)

} )

I am using this method for accessing the permission and for getting the access token but i am receiving the error: server_error: [code] 1675030 [message]: error performing query . I am not getting any token .

AshishCd commented 4 years ago

I am using the same code LoginManager and i can get the access key. Check if you have added the correct hash key.

tusharmutreja commented 4 years ago

I am facing the same issue , any help???

quocdai92 commented 4 years ago

LoginManager.logInWithPermissions(["email","public_profile" ]).then( function (result) { alert('result--'+JSON.stringify(result)) AccessToken.getCurrentAccessToken().then( (data) => { console.log(data.accessToken.toString()) const {accessToken} = data fetch('https://graph.facebook.com/me?fields=id,name,email,first_name,picture,last_name,gender,birthday&access_token=' + accessToken) .then((response) => response.json()) .then((json) => {

          alert('the facebook data is ' + JSON.stringify(json));

        })
        .catch(() => {

        })
}

)

} , function (error) {

 alert('Login fail with error: ' + error)

} )

I am using this method for accessing the permission and for getting the access token but i am receiving the error: server_error: [code] 1675030 [message]: error performing query . I am not getting any token .

You must setLoginBehavior("web_only") on android devices before calling LoginManager.logInWithPermissions

if (Platform.OS === "android") { LoginManager.setLoginBehavior("web_only") } ...

suraneti commented 4 years ago

LoginManager.setLoginBehavior("web_only") no need anymore if you set hash key following a document configure.

For an application that already uploads to PlayStore follow this: https://github.com/facebook/react-native-fbsdk/issues/633#issuecomment-554335094

septe01 commented 3 years ago

I have the same error.. how is this the solve issu.?