React-native-fbsdk: webview not closing after authentication

Created on 28 Apr 2016  路  5Comments  路  Source: facebook/react-native-fbsdk

as title, i have setup the

<key>LSApplicationQueriesSchemes</key>
  <array>
    <string>fbapi</string>
    <string>fbapi20130214</string>
    <string>fbapi20130410</string>
    <string>fbapi20130702</string>
    <string>fbapi20131010</string>
    <string>fbapi20131219</string>
    <string>fbapi20140410</string>
    <string>fbapi20140116</string>
    <string>fbapi20150313</string>
    <string>fbapi20150629</string>
    <string>fbauth</string>
    <string>fbauth2</string>
    <string>fb-messenger-api</string>
    <string>fb-messenger-api20140430</string>
  </array>

also

<key>NSAppTransportSecurity</key>
  <dict>
    <key>NSExceptionDomains</key>
    <dict>
      <key>facebook.com</key>
      <dict>
        <key>NSIncludesSubdomains</key> <true/>
        <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/>
      </dict>
      <key>fbcdn.net</key>
      <dict>
        <key>NSIncludesSubdomains</key> <true/>
        <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>  <false/>
      </dict>
      <key>akamaihd.net</key>
      <dict>
        <key>NSIncludesSubdomains</key> <true/>
        <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/>
      </dict>
    </dict>
  </dict>

i am using the example code

LoginManager.logInWithReadPermissions(['public_profile']).then(
      function(result) {
        if (result.isCancelled) {
          alert('Login cancelled');
        } else {
          alert('Login success with permissions: '
            +result.grantedPermissions.toString());
        }
      },
      function(error) {
        alert('Login fail with error: ' + error);
      }
    );

Login cancelled after i click finsih in webview,
and the app is not in sandbox mode. any advise? thanks

Most helpful comment

@rakesh0r I am seeing the same issue. Were you able to resolve this? If so, can you please share your solution? Thanks.

All 5 comments

RN 0.24 IOS

You should click the 'OK' button in authentication dialog to finish Login Flow. 'Done' will cancel the login flow.

after clicking "OK" button web view is not closing. it is showing white screen.
screen shot 2016-06-23 at 11 20 18 am

Make sure you add the project's bundle ID to your Facebook app dashboard, like here https://developers.facebook.com/docs/ios/getting-started#manual-configuration.

@rakesh0r I am seeing the same issue. Were you able to resolve this? If so, can you please share your solution? Thanks.

Was this page helpful?
0 / 5 - 0 ratings