Android Question Firebase UI Auth: Facebook Login

yiankos1

Well-Known Member
Licensed User
Longtime User

DonManfred

Expert
Licensed User
Longtime User
based on the github page i would guess something like
this in the manifesteditor.

B4X:
CreateResource(values, config.xml,
<resources>
  <string name="facebook_application_id" translatable="false">CHANGE-ME</string>
  <string name="facebook_login_protocol_scheme" translatable="false">fbYOUR_APP_ID</string>
  <string name="default_web_client_id" translatable="false">CHANGE-ME</string>
  <string name="twitter_consumer_key" translatable="false">CHANGE-ME</string>
  <string name="twitter_consumer_secret" translatable="false">CHANGE-ME</string>
</resources>
)
AddApplicationText(
<meta-data
    android:name="com.facebook.sdk.ApplicationId"
    android:value="facebook_application_id" />
<meta-data
    android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
    android:value="true" />
)
 
Upvote 0

yiankos1

Well-Known Member
Licensed User
Longtime User
based on the github page i would guess something like
this in the manifesteditor.

B4X:
CreateResource(values, config.xml,
<resources>
  <string name="facebook_application_id" translatable="false">CHANGE-ME</string>
  <string name="facebook_login_protocol_scheme" translatable="false">fbYOUR_APP_ID</string>
  <string name="default_web_client_id" translatable="false">CHANGE-ME</string>
  <string name="twitter_consumer_key" translatable="false">CHANGE-ME</string>
  <string name="twitter_consumer_secret" translatable="false">CHANGE-ME</string>
</resources>
)
AddApplicationText(
<meta-data
    android:name="com.facebook.sdk.ApplicationId"
    android:value="facebook_application_id" />
<meta-data
    android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
    android:value="true" />
)
I get this error:

B4X:
main_button1_click (java line: 426)
java.lang.RuntimeException: Facebook provider cannot be configured without dependency. Did you forget to add 'com.facebook.android:facebook-android-sdk:VERSION' dependency?
    at com.firebase.ui.auth.AuthUI$AuthIntentBuilder.setAvailableProviders(AuthUI.java:498)
    at com.firebase.ui.auth.AuthUI$AuthIntentBuilder.setProviders(AuthUI.java:536)
    at de.donmanfred.SignInIntentBuilderWrapper.setProviders(SignInIntentBuilderWrapper.java:77)
    at com.dreamon.seeida.main._button1_click(main.java:426)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:5197)
    at android.view.View$PerformClick.run(View.java:20926)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:5942)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
** Service (newinst2) Start **
 
Upvote 0

yiankos1

Well-Known Member
Licensed User
Longtime User
Sounds like you need to add facebook specific entries too. You need to check the Facebook documentation.
I cant help on this. I do not have a Facebook app and i never configured auth to use it.
Good morning,
I think i need to add "facebook.aar" from facebook SDK but if i add it through "#AdditionalJar: facebook.aar", i have same problem.
 
Upvote 0

yiankos1

Well-Known Member
Licensed User
Longtime User
So i tried everything but i could do this. I think that log says that i need facebook sdk at my project. But how can i add it? Do i need a wrapper? I tried this facebook sdk wrapper but still same error. Anyone can help?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
But how can i add it?
i don´t know as i wrote already. I never tried to add Facebook and i do not have a Facebook App at all which i could use.

You need to check the Facebook Documentation.

It is possible that you need a wrapper for it.
 
Upvote 0
Top