darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
191 stars 124 forks source link

Login Not Working #358

Open cavedweller opened 8 months ago

cavedweller commented 8 months ago

What version are you using?

6.0.1

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

Windows 11

What platforms are you seeing the problem on?

Android

pubspec.yaml

name: test
description: A new Flutter project.

version: 1.0.0

environment:
  sdk: ">=3.0.0 <4.0.0"

dependencies:
  flutter:
    sdk: flutter

  http: ^1.1.0 
  flutter_facebook_auth: ^6.0.1
  flutter_lints: ^2.0.0

Describe the Bug

This is to do with a previous issue raised and subsequently closed https://github.com/darwin-morocho/flutter-facebook-auth/issues/319#issue-1515612316

I am having the same issue as the one above. After googling I have found the following:

Facebook has implemented a new login Method called Facebook Login for Business https://developers.facebook.com/docs/facebook-login/facebook-login-for-business The setup for Facebook Login for business https://github.com/thebergamo/react-native-fbsdk-next/issues/388#issuecomment-1486206663

The issue is that I have to now create a configuration which includes the permissions I need and I am then given a configuration id which needs to be used to log in.

image

The current package does not have provision for this yet by my understanding.

Will this be something you can implement?

Expected Behavior

To be able to log into Facebook with the new method .

To Reproduce

 List<String> permissions = [
    'pages_show_list',
    'pages_read_engagement',
    'pages_manage_metadata',
  ];

 final LoginResult result = await FacebookAuth.instance.login(permissions: permissions,loginBehavior: LoginBehavior.dialogOnly); 

Relevant log output

No response

flutter doctor -v

[√] Flutter (Channel stable, 3.10.2, on Microsoft Windows [Version 10.0.22621.2134], locale en-ZA)
    • Flutter version 3.10.2 on channel stable at C:\Users\user\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9cd3d0d9ff (3 months ago), 2023-05-23 20:57:28 -0700
    • Engine revision 90fa3ae28f
    • Dart version 3.0.2
    • DevTools version 2.23.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at C:\Users\user\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 33.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.6.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.6.33815.320
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK

[√] Android Studio (version 2022.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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.6+0-b2043.56-9586694)

[√] VS Code
    • VS Code at C:\Users\user\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.60.0

[√] Connected device (4 available)
    • SM G973F (mobile) • RF8M324QDQT • android-arm64  • Android 12 (API 31)
    • Windows (desktop) • windows     • windows-x64    • Microsoft Windows [Version 10.0.22621.2134]
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 115.0.5790.171
    • Edge (web)        • edge        • web-javascript • Microsoft Edge 115.0.1901.188

[√] 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

darwin-morocho commented 8 months ago

@cavedweller this plugins only makes a wrapper between the dart code and the native sdk so if the login is not supported that means that the native sdk does not support that permissions

cavedweller commented 8 months ago

@darwin-morocho Thank you for the quick response.😁

So I managed to change back to the original login however Facebook prompted me with a message saying that this is a temporary change and will revert back.

I had a look again at the new login Method and nothing hectic seems to have changed. image

It seems that the key name has changed from SCOPE to CONFIG_ID and the RESPONSE_TYPE has been set to CODE

This change in login seems to only effect Tech providers and business app developers

Although this will not effect most Facebook login use cases, it will effect apps that rely on Facebook API request further down the line (posting, insights, ads etc) as it seems as though this is going to be the preferred method for users to login eventually.

Maybe you can have a look into this before it becomes a permanent switch as I really enjoy using this package.

heshesh2010 commented 6 months ago

+1

gabielchong commented 3 months ago

any update, how can we integrate this with "facebook business login"?

ManeeshDev commented 2 months ago

any update, how can we integrate this with "facebook business login"?

Did you find tutorials or some solution for "Facebook Login for Business"??

darwin-morocho commented 2 months ago

Due to the native facebook sdk on ios and android does not support this I can do anything