question

Bar Shoulian avatar image
Bar Shoulian asked

Cant Login to facebook on android build

Hi,

Im trying to create a login with Facebook for my game on android.

I have been following the guide:

https://www.youtube.com/watch?v=mqPiIlpQFBc&list=PLHCfyL7JpoPZz3NuJq-pvyJjoyRQ3Weru&index=1

And also tried the script - "PlayfabFacebookAuthExample"

From Playfab documentation.

In both ways im having the same issue.

In unity editor the login works fine but on android build the window never pops-up.

It seems that Facebook doesn't initialize on android.

Not sure what is causing the issue.

I tried to re-install Facebook SDK and update the unity version, also verified that the JDK im using is up to date.

Not sure what is causing the issue.

unity3dsdksAuthenticationandroid
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Bar Shoulian avatar image
Bar Shoulian answered

The issue got solved

I will post here the solution in case someone will have the exact issue in the future.

To solve this issue you will need to edit the proguard-user.txt

go to project settings under publishing settings if your using Gradle build you will have the

option to enable - "Custom Progurad file"

after enabling go to the file location open it and write there:

-keep class com.facebook.** { *; } 
-keepattributes Signature

save it and run another build issue will be solved

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.