Skip to content
Advertisement

Android ProGuard settings for Facebook

I finally found out why my app crashes built for release. ProGuard was indeed stripping code from my application but i prevented this by manually adding the classes with the keep command in the proguard-android.txt (found in the sdk).

For Facebook I used:

JavaScript

But I think I’m still missing something. The app is crash free now but I can’t log in to Facebook and use Open Graph. When I built in debug mode this all works fine.

What are your proguard settings for using Facebook and Facebook’s Open Graph?

EDIT

This are my manually added commands for ProGuard:

JavaScript

EDIT 2 So the problem for not logging in was that I used my debug hash key instead of my release hash key. Changed that in my app settings (developers.facebook.com) and found out that my app finally logs in but crashes after login.

Dont know if this still is a ProGuard problem but it returned this error:

JavaScript

Advertisement

Answer

fixed:

JavaScript

instead of:

JavaScript

Also be sure to check your hash key in your facebook app settings.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement