Firebase FaceBookAuthUI not working?

332 views Asked by At

I am trying to add facebook based login using firebaseUI,however it is not working . The gist of MainActivity is gist The code that has been used to display the fb based login is

AuthUI.getInstance()
                                    .createSignInIntentBuilder()
                                    .setIsSmartLockEnabled(false)
                                    .setProviders(

                                            AuthUI.FACEBOOK_PROVIDER,
                                            AuthUI.EMAIL_PROVIDER,
                                            AuthUI.GOOGLE_PROVIDER)
                                    .build(),
                            RC_SIGN_IN);

I have added the app id to string's .xml

<string name="facebook_app_id" translatable="false">XXXXXXXXXXXXXX</string>
<string name="fb_login_protocol_scheme">fbXXXXXXXXXXXXXXXXX</string>

Below is the video of what happens on login. https://www.youtube.com/watch?v=5PiCFiY3GH8

I have searched a lot on internet but am unable to resolve this. A similar Stack-overflow question but with no resolution is

FirebaseUI authentication with Facebook not working

Below is The logcat that i am seeing.

01-01 15:44:30.126 1563-1633/? I/ActivityManager: Displayed com.google.firebase.udacity.friendlychat/com.facebook.FacebookActivity: +248ms
01-01 15:44:31.189 4811-14350/? W/fb4a.BlueServiceQueue: Exception during service
                                                         X.2Oo: [code] 100 [message]: invalid app id (100) [extra]: null
                                                             at X.11M.a(:172024)
                                                             at X.1pN.j(:329316)
                                                             at X.2R7.a(:409495)
                                                             at X.159.handleResponse(:180125)
                                                             at com.facebook.tigon.httpclientadapter.TigonHttpClientAdapterImpl$ClientCallbacks$1.run(:327964)
                                                             at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                             at com.facebook.common.executors.WrappingExecutorService$1.run(:77498)
                                                             at com.facebook.common.executors.DefaultConstrainedListeningExecutorService$Worker.run(:63229)
                                                             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                             at com.facebook.common.executors.NamedThreadFactory$1.run(:77690)
                                                             at java.lang.Thread.run(Thread.java:818)
01-01 15:44:31.222 1563-3453/? I/ActivityManager: START u0 {cmp=com.facebook.katana/.ProxyAuth (has extras)} from uid 10164 on display 0
01-01 15:44:31.250 13879-13930/com.google.firebase.udacity.friendlychat D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=1230, _sc=FacebookActivity, _si=2594922199852488391}]
01-01 15:44:31.320 1563-3871/? I/ActivityManager: START u0 {cmp=com.facebook.katana/.gdp.WebViewProxyAuth (has extras)} from uid 10140 on display 0
01-01 15:44:31.340 3456-13966/? V/FA-SVC: Event recorded: Event{appId='com.google.firebase.udacity.friendlychat', name='_e', params=Bundle[{_o=auto, _et=1230, _sc=FacebookActivity, _si=2594922199852488391}]}
01-01 15:44:31.358 1563-3883/? I/ActivityManager: START u0 {cmp=com.facebook.katana/.gdp.ProxyAuthDialog (has extras)} from uid 10140 on display 0
01-01 15:44:31.981 1563-1633/? I/ActivityManager: Displayed com.facebook.katana/.gdp.ProxyAuthDialog: +613ms (total +736ms)
01-01 15:44:32.759 4811-14396/? W/fb4a.BlueServiceQueue: Exception during service
                                                         X.2Oo: [code] 100 [message]: (#100) Param third_party_app_id must be a valid application id [extra]: 
                                                             at X.11M.a(:172075)
                                                             at X.11M.a(:171971)
                                                             at X.11M.a(:171960)
                                                             at X.11M.a(:171979)
                                                             at X.2CN.a(:382666)
                                                             at X.159.b(:180159)
                                                             at X.159.handleResponse(:180124)
                                                             at com.facebook.tigon.httpclientadapter.TigonHttpClientAdapterImpl$ClientCallbacks$1.run(:327964)
                                                             at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                             at com.facebook.common.executors.WrappingExecutorService$1.run(:77498)
                                                             at com.facebook.common.executors.DefaultConstrainedListeningExecutorService$Worker.run(:63229)
                                                             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                             at com.facebook.common.executors.NamedThreadFactory$1.run(:77690)
                                                             at java.lang.Thread.run(Thread.java:818)
01-01 15:44:46.906 3456-13966/? V/FA-SVC: Uploading data. app, uncompressed size, data: com.google.firebase.udacity.friendlychat, 737, 
                                          batch {
                                            bundle {
                                              protocol_version: 1
                                              platform: android
                                              gmp_version: 10084
                                              uploading_gmp_version: 10084
                                              config_version: 1483190241814000
                                              gmp_app_id: 1:1020544687127:android:64e58dacc0483faa
                                              app_id: com.google.firebase.udacity.friendlychat
                                              app_version: 1.0
                                              app_version_major: 1
                                              firebase_instance_id: dsAOV03UKx4
                                              app_store: manual_install
                                              upload_timestamp_millis: 1483265686855
1

There are 1 answers

0
Animesh Chhabra On BEST ANSWER

This is due the fact that i was using

<string name="facebook_app_id" translatable="false">XXXXXXXXXXXXXX</string>

Whereas i should have used

<string name="facebook_application_id" translatable="false">XXXXXXXXXXXXX</string>

Confusion was because the facebook quickstart guide had said to use facebook_app_id wheras it should have been facebook_application_id in case FireBaseUIAuth.