Closed afzl-wtu closed 2 years ago
@afzl-wtu if your facebook app is in dev mode You should use test accounts or use the same facebook account that you have used to create the app in the facebook developer console
I am using test account and developer account.
Also try to use mobile data instead of wifi
Lol... so if people are using wifi they can not login through facebook?
Google Sign In and Google Phone Authentication is working fine. but only facebook fails.
Lol... so if people are using wifi they can not login through facebook?
That doesn't depend of this plugin, sometimes you can have blocks due to your internet provider , or block by country or even a wrong configuration in your dev console
I see. Facebook is working fine in my web browser and facebook app. That is why even I switched to VPN based in germany. Can you reproduce the error on latest package version?
before release a new version I have tested on android and ios.
Also try to use a different login behavior when you call login use LoginBehavior.nativeWithFallback
, and if you think is a bug of the current facebook sdk try to use a previous version of this plugin and let me known if the error persists
Tried LoginBehavior.nativeWithFallback and 4.0.1 but still failed.
Tried LoginBehavior.nativeWithFallback and 4.0.1 but still failed.
It seems that this issue should be here https://github.com/facebook/facebook-android-sdk
Should I download facebook sdk in my build.gradle or Add any dependency in AndroidManifest.xml file? Because in documentation it is not mentioned anywhere to import any kind of facebook sdk, if I am not wrong.
My project level build.gradle file:
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
app level build.gradle file:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 31
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "pk.dotnow.dot_now"
minSdkVersion 23
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:29.2.1')
implementation 'com.google.firebase:firebase-analytics-ktx'
}
Should I download facebook sdk in my build.gradle or Add any dependency in AndroidManifest.xml file? Because in documentation it is not mentioned anywhere to import any kind of facebook sdk, if I am not wrong.
that is not necessary because by default your project will take all dependencies from flutter_facebook_auth
Thanks for confirming... Is everything OK in build.gradle file mentioned above and AndroidManifest.xml file?
also you can clone the example folder and change your facebook credentials and the package name with your app data
if the error persist is something wrong in your facebook developer console or your key hash is invalid
also you can clone the example folder and change your facebook credentials and the package name with your app data
if the error persist is something wrong in your facebook developer console or your key hash is invalid
I cloned your app it also did not work. My Facebook app was also not working very well. So, after spending my 2 days, I remembered that I had blocked facebook in AdAway (Blocks ads on rooted phones by filtering DNS queries). So I turned it off and Now everything Works out of Box. Thanks for your time and timely help.
Describe the bug I have imported latest package (flutter_facebook_auth: ^4.1.2) and followed all the documentaion on the website https://facebook.meedu.app/ for android. Now when I click on "sign in with facebook" Button . It takes me to facebook app where I allow the authorization. After this it closes and I am shifted back to app But I am not signed in the app. I got the following output from the debug Console: PP: result.status: Login Failed PP: result.message: CONNECTION_FAILURE: CONNECTION_FAILURE
I confirm internet is working fine and even I used vpn to check if it is problem of my local internet. I even cleared my cache by flutter clean command. I have also added required fields on facebook including SHA-1 in form of Base64 and turned on facebook authentication.
To Reproduce Flutter Code:
Environment Add your
flutter doctor -v
Add your
pubspec.yaml
Add your
Info.plist
Not relevent as I am testing for android only.
Add your
AppDelegate.swift
Not relevent as I am testing for android only.
Add your
MainActivity
Add your
AndroidManifest.xml
Add your
/app/res/values/strings.xml