Android + Facebook Connect not working in release build

后端 未结 4 1988
野趣味
野趣味 2020-12-21 15:28

I have an Android application that allows the user to connect to his Facebook account and automatically make a post on his wall.

All this is perfectly working with t

相关标签:
4条回答
  • 2020-12-21 16:18

    I was getting the error Webpage not available fbconnect://success#access_token=... When using an existing app (Draw Something) that connects to facebook. The problem went away when I uninstalled the two different facebook apps i had installed on my phone (Galaxy note 2 with Android 4.1.2) and reinstalled the current facebook app.

    0 讨论(0)
  • 2020-12-21 16:20

    I fixed it with the following rules (however I am no expert so there might be mistakes in there).

    -keep class com.facebook.android.*
    -keep class android.webkit.WebViewClient
    -keep class * extends android.webkit.WebViewClient
    -keepclassmembers class * extends android.webkit.WebViewClient { 
        <methods>; 
    } 
    
    0 讨论(0)
  • 2020-12-21 16:20

    To make facebookConnect work with an android release build you need to create a reference to the keystore file, which you have used for signing your app.

    on a mac:

    keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64

    on win:

    keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64

    the output should be set in Android -> Key Hashes in Facebook settings

    0 讨论(0)
  • 2020-12-21 16:21

    This is the only thing that worked for me with facebook sdk 3.0:

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

    (got this from http://adilatwork.blogspot.com/2013/01/parse-android-sdk-facebook-and-proguard.html)

    0 讨论(0)
提交回复
热议问题