darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
193 stars 127 forks source link

Is it possible to authenticate Facebook login with android and IOS tv #317

Closed amirVirtuenetz closed 1 year ago

amirVirtuenetz commented 1 year ago

What version are you using?

flutter_facebook_auth:5.0.6

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

window 10

What platforms are you seeing the problem on?

Android, iOS

pubspec.yaml

name: tv_application
description: A new Flutter project.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.18.0 <3.0.0"
dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.2
  intl: ^0.17.0
  get: ^4.6.5
  connectivity_plus: ^3.0.0
  dio: ^4.0.6
  http: ^0.13.5
  shared_preferences: ^2.0.15
  google_fonts: ^3.0.1
  font_awesome_flutter: ^10.2.1
  flutter_staggered_grid_view: ^0.6.2
  retry: ^3.1.0
  cached_network_image: ^3.2.2
  widget_marquee: ^0.0.5
  responsive_framework: ^0.2.0

  flutter_screenutil: ^5.6.0
  flutter_svg: ^1.1.6
  relative_scale: ^2.0.0
  get_storage: ^2.0.3
  easy_localization: ^3.0.1
  video_player: ^2.4.9
  chewie: ^1.3.6
  google_sign_in: ^5.4.2
  flutter_facebook_auth: ^5.0.6
  firebase_auth: ^4.2.1
  twitter_login: ^4.2.3
  flutter_easyloading: ^3.0.5
  firebase_core: ^2.4.0
  firebase_database: ^10.0.7

dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_lints: ^2.0.1

# 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:

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/images/
    - assets/images/icons/
    - assets/translations/

  fonts:
    - family: Roboto
      fonts:
        - asset: assets/fonts/Roboto-Regular.ttf

Describe the Bug

the Facebook login authentication didn't work when I run the application in TV emulator. according the official documentation of the Facebook says. the link is below https://developers.facebook.com/docs/android/devices#knownissues

Expected Behavior

I want to the same login behavior as it is working in android and iOS mobile devices.

To Reproduce

I want to the same login behavior as it is working in android and iOS mobile devices.

Relevant log output

No response

flutter doctor -v

Flutter (Channel stable, 3.3.0, on Microsoft Windows [Version 10.0.19045.2251], locale en-US)
    • Flutter version 3.3.0 on channel stable at D:\development\flutter sdk\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffccd96b62 (4 months ago), 2022-08-29 17:28:57 -0700
    • Engine revision 5e9e0e0aa8
    • Dart version 2.18.0
    • DevTools version 2.15.0

Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\Lenovo\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_HOME = C:\Users\Lenovo\AppData\Local\Android\Sdk
    • Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.3)
    • Android Studio at D:\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 11.0.13+0-b1751.21-8125866)

[√] Connected device (2 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.2251]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 108.0.1462.46

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.dapsocially_tv_application">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED"
        tools:ignore="ProtectedPermissions" />
    <queries>
        <provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
        <provider android:authorities="com.facebook.orca.provider.PlatformProvider" />
    </queries>
    <queries>
        <package android:name="com.facebook.katana" />
    </queries>
    <application
        android:label="Dapsocially TV Application"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher"
        android:usesCleartextTraffic="true"
        android:hardwareAccelerated="false"
        android:largeHeap="true"
        android:banner="@mipmap/ic_launcher">

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|navigation|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"
                />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" android:required="false" />
                <category android:name="android.intent.category.LAUNCHER"/>
            </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" />
        <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="com.facebook.FacebookActivity"
            android:configChanges=
                "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name" />
        <activity
            android:name="com.facebook.CustomTabActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="@string/fb_login_protocol_scheme" />
            </intent-filter>
        </activity>
    </application>
    <uses-feature android:name="android.software.leanback" android:required="false" />
    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
    <uses-feature android:name="android.hardware.faketouch"
    android:required="false"/>
    <uses-feature android:name="android.hardware.telephony"
    android:required="false"/>
    <uses-feature android:name="android.hardware.camera"
    android:required="false"/>
    <uses-feature android:name="android.hardware.nfc"
    android:required="false"/>
    <uses-feature android:name="android.hardware.location.gps"
    android:required="false"/>
    <uses-feature android:name="android.hardware.microphone"
    android:required="false"/>
    <uses-feature android:name="android.hardware.sensor"
    android:required="false"/>
</manifest>

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

darwin-morocho commented 1 year ago

Hi this plugin is not compatible with android tv and os tv in that case you must use https://developers.facebook.com/docs/facebook-login/for-devices

amirVirtuenetz commented 1 year ago

Hi this plugin is not compatible with android tv and os tv in that case you must use https://developers.facebook.com/docs/facebook-login/for-devices yeah I have already visited the above link which you have sent because I don't how to about Koltin

have you already worked on TV, where you have to face the issue that I have created