darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
198 stars 139 forks source link

Facebook login missing button #414

Open datpt11 opened 3 months ago

datpt11 commented 3 months ago

What version are you using?

flutter_facebook_auth: 6.0.2 facebook: 468.0.0 ios: 17.5.1

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

Apple M1 Pro

What platforms are you seeing the problem on?

iOS

pubspec.yaml

# Localization https://github.com/dart-lang/intl
  intl: ^0.18.0
  # Toast https://github.com/OpenFlutter/flutter_oktoast
  oktoast: ^3.2.0
  # https://github.com/ReactiveX/rxdart
  rxdart: ^0.27.3
  # Plugin cho URL khởi chạy (hỗ trợ web) https://github.com/flutter/plugins/tree/master/packages/url_launcher
  url_launcher: ^6.1.7
  # Plugin lựa chọn hình ảnh (hỗ trợ web) https://github.com/flutter/plugins/tree/master/packages/image_picker
  image_picker: ^1.1.2
  # WebView https://github.com/flutter/plugins/tree/master/packages/webview_flutter
  webview_flutter: ^3.0.4
  # https://github.com/theyakka/fluro
  fluro: ^2.0.3
  # https://github.com/rrousselGit/provider
  provider: ^6.0.2
  # Nhận thông tin thiết bị hiện tại https://github.com/fluttercommunity/plus_plugins/tree/main/packages/device_info_plus
  device_info_plus: ^9.0.3
  # https://github.com/101Loop/Skeleton-Text.git
  skeleton_text: ^3.0.0

  # https://github.com/ajilo297/Flutter-Dotted-Border.git
  dotted_border: ^2.0.0+1
  # https://github.com/dnfield/flutter_svg.git
  flutter_svg: ^1.1.6
  # https://github.com/letsar/flutter_staggered_grid_view.git
  flutter_staggered_grid_view: ^0.4.0
  # https://github.com/fluttercandies/extended_image.git
  extended_image: ^8.1.1
  # https://github.com/magnuswikhog/easy_debounce.git
  easy_debounce: ^2.0.2+1
  # https://github.com/comigor/fuzzy.git
  flutter_phosphor_icons: ^0.0.1+6
  shared_preferences: ^2.0.8
  fluttertoast: ^8.0.8
  logger: ^1.1.0
  pretty_dio_logger: ^1.1.1
  percent_indicator: ^4.2.2
  flutter_localizations:
    sdk: flutter
    version: ^0.0.0
  jiffy: ^5.0.0
  html_unescape: ^2.0.0
  syncfusion_flutter_datepicker: ^23.1.36
  dotted_line: ^3.1.0
  flutter_switch: ^0.3.2
  flutter_keyboard_visibility: ^5.2.0
  timelines: ^0.1.0
  numberpicker: ^2.1.1
  firebase_crashlytics: ^3.3.3
  firebase_analytics: ^10.4.3
  package_info_plus: ^4.1.0
  permission_handler: ^10.2.0
  synchronized: ^3.0.0+3
  hive: ^2.2.3
  flutter_inappwebview: ^5.7.2+3
  barcode: ^2.2.3
  slang: ^3.16.2
  printing: ^5.11.0
  jwt_decoder: ^2.0.1
  flutter_facebook_auth: 6.0.2
  flutter_speed_dial: ^7.0.0
  flutter_html: ^3.0.0-beta.2
  vibration: ^1.7.7
  just_audio: ^0.9.34
  uri_to_file: ^1.0.0
  emoji_picker_flutter: ^1.1.2
  share_plus: ^7.2.2
  photo_manager: 3.0.0-dev.2
  camera_android: ^0.10.8+16
  network_info_plus: ^4.1.0+1
  flutter_slidable: ^3.0.1

Describe the Bug

When I log in via the fb app, I get an error image 2024-06-18 08-39-07

Expected Behavior

image This is the missing button part

To Reproduce

Future login() async { final Map<String, String> params = <String, String>{}; await FacebookAuth.instance.logOut(); final LoginResult result = await FacebookAuth.instance.login(permissions: [ "public_profile", "email", "pages_manage_metadata", "pages_read_engagement", "pages_show_list", "pages_read_user_content", "pages_manage_posts", "pages_manage_engagement", "pages_messaging", "ads_read", "page_events", "instagram_basic", "instagram_manage_messages", "instagram_manage_comments", "pages_show_list", "ads_management", "catalog_management", 'business_management' ]); // by default we request the email and the public profile var locale = TranslationProvider.of(view.getContext()).flutterLocale; FacebookAuth.instance.autoLogAppEventsEnabled(false); Codec<String, String> stringToBase64 = utf8.fuse(base64); if (result.status == LoginStatus.success) { ... } }

Relevant log output

No response

flutter doctor -v

[✓] Flutter (Channel stable, 3.19.6, on macOS 14.3 23D56 darwin-arm64, locale en-US)
    • Flutter version 3.19.6 on channel stable at /Users/datphung/workspace/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (9 weeks ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/datphung/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/datphung/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.90.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.90.0

[✓] Connected device (4 available)
    • CPH2437 (mobile) • AYGQCURSSG65JNDQ          • android-arm64  • Android 14 (API 34)
    • DinoP (mobile)   • 00008110-001A492836EB801E • ios            • iOS 17.5.1 21F90
    • macOS (desktop)  • macos                     • darwin-arm64   • macOS 14.3 23D56 darwin-arm64
    • Chrome (web)     • chrome                    • web-javascript • Google Chrome 125.0.6422.142

[✓] Network resources
    • All expected network resources are available.

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

vanphuc1234 commented 3 months ago

I'm facing the same issue, with flutter_facebook_auth 6.0.3, even after upgrading to 7.0.0. In my situation, I want to request these permissions: [ 'public_profile', 'email', 'pages_show_list', 'pages_manage_metadata', 'pages_messaging', 'pages_read_engagement', 'pages_read_user_content', 'pages_manage_engagement', ]. After selecting the Facebook account and navigating to the "Select facebook page" screen as shown in the photo below, the "Next" button to navigate to the next step does not appear

darwin-morocho commented 3 months ago

@datpt11 @vanphuc1234 could you try with flutter_facebook_auth:7.0.1?

tronghau2110 commented 3 months ago

@vanphuc1234 Have you solved it yet? I also have a similar problem

datpt11 commented 3 months ago

I upgraded to 7.0.1 but it still doesn't work, I can't change the login behavior either. I had to uninstall the Facebook app to switch to Facebook login mode using the browser @darwin-morocho

datpt11 commented 3 months ago

I did the trick by removing fbapi in LSApplicationQueriesSchemes so that when I log in, it automatically falls back to logging in to Facebook via the web browser. :))