darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
194 stars 129 forks source link

Given URL is not allowed by the Application configuration Facebook application error after login #264

Closed cuongdq0410 closed 1 year ago

cuongdq0410 commented 1 year ago

What version are you using?

^4.4.0

What OS and version are you using to local deploy your application?

macOS 12.4

What platforms are you seeing the problem on?

Android

pubspec.yaml

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.12.0 <3.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter

  flutter_localizations:
    sdk: flutter

  intl: ^0.17.0

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  chopper: ^4.0.6
  chopper_generator: ^4.0.6
  json_annotation: ^4.6.0
  #analyzer: ^2.7.0
  json_serializable: ^6.3.1
  logging: ^1.0.2
  connectivity_plus: ^2.3.5
  shared_preferences: ^2.0.15
  rxdart: ^0.27.4
  provider: ^6.0.3
  bot_toast: ^4.0.2
  flutter_svg: ^1.1.1+1
  card_swiper: ^2.0.4

  # Firebase
  firebase_core: ^1.19.1
  firebase_messaging: ^11.4.4
  firebase_remote_config: ^2.0.11
  package_info: ^2.0.2
  version: ^2.0.0
  open_store: ^0.2.4
  page_transition: ^2.0.4
  dartx: ^1.1.0
  share_plus: ^4.0.10
  dots_indicator: ^2.1.0
  responsive_framework: ^0.2.0
  flutter_facebook_auth: ^4.4.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^1.0.0
  build_runner: ^2.1.5
  build_test: ^2.1.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  generate: true

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  assets:
    - assets/images/mobile/
    - assets/images/tablet/
    - assets/images/
    - assets/
    - assets/fonts/

  # To add assets to your application, add an assets section, like this:
  # assets:
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: Cufonfonts
      fonts:
        - asset: assets/fonts/sf-ui-display-ultralight.otf
          weight: 100
        - asset: assets/fonts/sf-ui-display-thin.otf
          weight: 200
        - asset: assets/fonts/sf-ui-display-light.otf
          weight: 300
        - asset: assets/fonts/sf-ui-display-medium.otf
          weight: 400
        - asset: assets/fonts/sf-ui-display-semibold.otf
          weight: 500
        - asset: assets/fonts/sf-ui-display-bold.otf
          weight: 600
        - asset: assets/fonts/sf-ui-display-heavy.otf
          weight: 700
        - asset: assets/fonts/sf-ui-display-black.otf
          weight: 800
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages
pubspec:
  yaml:

Describe the Bug

Screenshot_1657697193

Expected Behavior

.

To Reproduce

After login with my Facebook account success it returns me error like picture

Relevant log output

No response

flutter doctor -v

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-x64, locale en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.68.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

cuongdq0410 commented 1 year ago

Can anyone face this issue?

darwin-morocho commented 1 year ago

@cuongdq0410 this is not an issue of this plugin. The problem is your Android configuration on your Facebook developers console. Make sure that you are using the correct package name in your Android platform configuration. please add a screenshot of your Android platform configuration (hide your keys hashes) and also add your AndroidManifest

cuongdq0410 commented 1 year ago
Screen Shot 2022-07-13 at 18 49 11

I have to fill keys hashes, Package Names and Class Name. it will solve problem, isn't it?

cuongdq0410 commented 1 year ago

@darwin-morocho

darwin-morocho commented 1 year ago

@darwin-morocho to use the facebook auth flow on Android you must fill that info in your facebook console.

I will close this because is not an issue of this plugin and seems that the plugin documentation was not followed before open this.