Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot login if Facebook app is installed in Android #379

Open
GnuaAruht opened this issue Jan 10, 2024 · 1 comment
Open

Cannot login if Facebook app is installed in Android #379

GnuaAruht opened this issue Jan 10, 2024 · 1 comment

Comments

@GnuaAruht
Copy link

GnuaAruht commented Jan 10, 2024

What version are you using?

6.03

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

MacOS

What platforms are you seeing the problem on?

Android

pubspec.yaml

name: app_name
description: App Description

version: 1.0.0+1


environment:
  sdk: '>=3.1.3 <4.0.0'

dependencies:
  flutter:
    sdk: flutter
  flutter_facebook_auth: ^6.0.3

Describe the Bug

My app cannot login if Facebook app is installed, but works well with Chrome Custom Tab if the app is not installed.
Error Message is

Login Error : There is an error in logging you into the application. Please try again later.

Expected Behavior

I want to login to Facebook even if the app is installed.

To Reproduce

``

Relevant log output

No response

flutter doctor -v

``

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.healthppypatient.s_healthppy_patient"
    xmlns:tools="http://schemas.android.com/tools">

    <queries>
        <provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
    </queries>

    <uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.CALL_PHONE"/>

    <application
        android:name="${applicationName}"
        android:label="Patient"
        android:icon="@mipmap/ic_launcher">

        <meta-data android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id"/>

        <meta-data android:name="com.facebook.sdk.ClientToken"
            android:value="@string/facebook_client_token"/>

        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:exported="true"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <!-- Displays an Android View that continues showing the launch screen
                 Drawable until Flutter paints its first frame, then this splash
                 screen fades out. A splash screen is useful to avoid any visual
                 gap between the end of Android's launch screen and the painting of
                 Flutter's first frame. -->
            <meta-data
              android:name="io.flutter.embedding.android.SplashScreenDrawable"
              android:resource="@drawable/launch_background"
              />

            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>

            <intent-filter>
                <action android:name="FLUTTER_NOTIFICATION_CLICK"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>

        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />

    </application>

</manifest>

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

@GnuaAruht GnuaAruht changed the title Cannot login when Facebook is installed in Android Cannot login if Facebook app is installed in Android Jan 10, 2024
@darwin-morocho
Copy link
Owner

darwin-morocho commented Jan 10, 2024

@GnuaAruht keep in mind that this is not an issue of this plugin. There are some reasons why the facebook app is not allowing to login.

  • You don't have the correct permissions enabled in your meta console application
  • You are using a real facebook account to login but your app is still in dev mode.
  • Your key hashes registered in your console are invalid.

Try looking in the previous issues of this repo to check how other devs have solved this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants