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

Not getting the access token #679

Closed AshishCd closed 4 years ago

AshishCd commented 4 years ago

Hi,

when I click on login the popup lets me log in to facebook and once login I can't get the access token back. But if I click on logout I am getting the logout message in the console. <LoginButton publishPermissions={['publish_actions']} onLoginFinished={(error, result) => { if (error) { alert('login has error: ' + result.error); } else if (result.isCancelled) { alert('login is cancelled.'); } else { // This prints out the access token object (includes expiration time and etc...) AccessToken.getCurrentAccessToken().then(accessToken => console.log(accessToken), ); } }} onLogoutFinished={() => console.log('logout.')} />

AshishCd commented 4 years ago

I am using the Login manager to get the access key token.