darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
197 stars 142 forks source link

Facebook business login issues : it looks like app isn't available #427

Open DEVELOPBYSHUBH opened 2 months ago

DEVELOPBYSHUBH commented 2 months ago

What version are you using?

7.1.1

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

macOS 14.4

What platforms are you seeing the problem on?

Android, iOS

pubspec.yaml

flutter_facebook_auth: ^7.1.1

  app_tracking_transparency: ^2.0.6

Describe the Bug

When I am doing a Facebook business login after login my Facebook account I get that it looks like the app isn't available. Simulator Screenshot - iPhone 15 Pro Max - 2024-09-11 at 13 15 15

Expected Behavior

It should not come this

To Reproduce

Future<ApiResult> getFacebookUserToken() async { print("facebook login"); try { final LoginResult loginResult = await FacebookAuth.instance.login(permissions: [ SocialMediaConstants.permissionPagesShowList, SocialMediaConstants.permissionManageMetadata, SocialMediaConstants.permissionManagePosts, SocialMediaConstants.permissionManageReadEngagement, SocialMediaConstants.permissionPageMessaging, SocialMediaConstants.permissionPageManageAds, SocialMediaConstants.permissionBusinessManagement ]); print("loginResult , ${loginResult.message}");

  if (loginResult.status == LoginStatus.success &&
      // _isPostPermissionGrantedForFacebook(loginResult) &&
      loginResult.accessToken?.tokenString != null) {
    log.e("Result ${loginResult.accessToken?.toJson()}");
    log.d("Token ${loginResult.accessToken?.tokenString}");
    return ApiResult.success(loginResult.accessToken!.tokenString);
  } else if (loginResult.status == LoginStatus.success
      // &&  _isPostPermissionGrantedForFacebook(loginResult) == false
      ) {
    return const ApiResult.failure(NetworkExceptions.defaultError(
        'Please provide all requested post permission'));
  }
  return ApiResult.failure(NetworkExceptions.defaultError(
      loginResult.message ?? 'Something went wrong'));
} on Exception catch (e) {
  return ApiResult.failure(NetworkExceptions.getDioException(e));
}

}

Relevant log output

No response

flutter doctor -v

flutter doctor -v
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.6.1 23G93 darwin-arm64, locale
    en-IN)
    • Flutter version 3.22.2 on channel stable at
      /Users/nileshchaubey/Documents/allSoftware/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (3 months ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

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

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

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

[✓] Android Studio (version 2024.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.11+0-17.0.11b1207.24-11852314)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • 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

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

[✓] VS Code (version 1.82.3)
    • VS Code at /Users/nileshchaubey/Library/Mobile
      Documents/com~apple~CloudDocs/Desktop/Visual Studio Code.app/Contents
    • Flutter extension version 3.96.0

[✓] Connected device (4 available)
    • iPhone 15 Pro Max (mobile)      • 959246C5-D322-4554-B9C7-AD589A9C433A • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS
      14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS
      14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google
      Chrome 128.0.6613.120

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

• 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

Psquare-0 commented 2 months ago

Facing the same issue