Search code examples
iosflutterfacebook-authentication

crashes app when I log in using facebook auth


When I click on the button to show the authorization form, the application closes. If you run it through xcode, it writes the following Terminating app due to uncaught exception 'InvalidOperationException', reason: 'fb6259922858** is not registered as a URL scheme. Please add it in your Info.plist'*** but I have already added this to info.plist

info.plist

<key>CFBundleURLTypes</key>
    <array>
      <dict>
      <key>CFBundleURLSchemes</key>
      <array>
        <string>fb6259922858*****</string>
      </array>
      </dict>
    </array>
    <key>FacebookAppID</key>
    <string>6259922858*****</string>
    <key>FacebookClientToken</key>
    <string>ecbb0530f7ba58151a053ce5****</string>
    <key>FacebookDisplayName</key>
    <string>Helpster</string>
    <key>LSApplicationQueriesSchemes</key>
    <array>
      <string>fbapi</string>
      <string>fb-messenger-share-api</string>
      <string>fbauth2</string>
      <string>fbshareextension</string>
    </array>

Solution

  • You have to register URL Types in scheme under info tab.

    enter image description here