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

Login Failed and Invalid App ID #497

Open hagianga21 opened 5 years ago

hagianga21 commented 5 years ago

Hi, I am using Facebook SDK 4.40.0, I followed all steps, and my app run without any errors. However, when I click on fb login, it cannot login and always show Login Failed. And when I followed Share Dialogs, it said "Invalid App ID: The provided app ID does not look like a valid app ID". What could I check now? Thank you so much

imbudhiraja commented 5 years ago

@hagianga21 The problem is that Facebook SDK is keeping the previous session token, and when you are trying to login again, getting this error, to solve this problem all you need to do is to call the logOut method from the LoginManager.

LoginManager.logOut();

try to this before LoginManager.logInWithReadPermissions

iparshantnagpal commented 5 years ago

Yes @imbudhiraja you are right . Working Perfectly Now

npapratovic commented 5 years ago

@imbudhiraja Hi, thanks for pointing this about keeping sessions I had the same error with App ID (which is actually the client_id or clientId - Facebook changed this during years) with vue-social-auth. I had to clear cache, clear sessions, clear Laravel config, and restarted artisan. Now, the error is resolved and App Id is loaded correctly

umarovdoniyor commented 4 years ago

put this code to your

/android/app/src/main/res/values/strings.xml

<string name="facebook_app_id">2674387249275509</string>

manishgoswamig commented 4 years ago

Only update App Id and App Secret