Skip to content Skip to sidebar Skip to footer

I Am Using Firebase Ui Login Into My App But When I Use Facebook Builder It Stops The App How To Inflate That Button..?

i am enclosing the code of the Java file, dependency file and Manifestfile i declared outside private static final int MY_REQUEST_CODE = 123; List prov

Solution 1:

Change your dependencies to :

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'//1.0.2
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'//Firebase
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.firebaseui:firebase-ui-auth:6.2.1'//Facebook

implementation 'com.facebook.android:facebook-android-sdk:5.15.1'



testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'//Cardview and Material
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.1.0'//1.1.0//button
implementation 'info.hoang8f:fbutton:1.0.5'
implementation 'com.google.android.gms:play-services-location:17.0.0'

Edit :

Add these two strng resources to your strngs :

<stringname="facebook_application_id"translatable="false">APP_ID</string><!-- Facebook Application ID, prefixed by 'fb'. Enables Chrome Custom tabs. --><stringname="facebook_login_protocol_scheme"translatable="false">fbAPP_ID</string>

If you run the app, It will work now, but clicking the facebook button won't get the user authenticated until you get the app id and scheme

To get the app id, log into your facebook account, visit the developers page https://developers.facebook.com/ Create an app there, then add the 'facebook login' and then follow the instructions given. You will find your app id in the top of the page of your facebook app

Just two notes :

  • You need copy the 'OAuth Redirect URI' from the firebase console page(the link given when enabling facebook authentication) to the settings of your facebook app

  • You will need the 'Key hash' which you can be obtained as described here https://stackoverflow.com/a/25524657/9006761 You will then copy it to your facebook app settings

Edit : Scheme is just app id prefixed by 'fb'

Post a Comment for "I Am Using Firebase Ui Login Into My App But When I Use Facebook Builder It Stops The App How To Inflate That Button..?"