安卓+ Facebook连接不工作在发布版本
我有一个Android应用程序,允许用户连接到自己的Facebook账户,并自动做出他的墙后。
I have an Android application that allows the user to connect to his Facebook account and automatically make a post on his wall.
这一切都完美地工作与调试版本(使用备用的WebView对话框或本机应用程序活动)。我使用的是最新的Facebook连接API为Android。
All this is perfectly working with the debug build (using either the fallback webview dialog or the native application activity). I am using the latest Facebook Connect API for Android.
在测试应用程序的发布版本,我注意到,回退的WebView对话框不允许连接到Facebook(输入用户名/密码后,它显示了一个标准的404页,指出它无法找到该网页fbconnect: /成功/#access_token = 3213546 ...)
When testing the release version of the application, I noticed that the fallback webview dialog does not allow to connect to Facebook (after entering the username/password, it shows a standard 404 page that says it could not find the page fbconnect:/success/#access_token=3213546...)
我怀疑的ProGuard已经剥离了一些code,但我无法弄清楚如何确定是什么原因造成的问题。任何人可以提供一些线索,让我在正确的方向?
I suspect proguard has stripped some code but I cannot figure out how to determine what is causing the problem. Could anybody give some clues and get me going in the right direction?
我的proguard.cfg文件包含以下行离开Facebook连接独自:
My proguard.cfg file contains the following lines to leave Facebook Connect alone:
-keep class com.facebook.android.*
-keepclassmembers public class com.facebook.android.Facebook {
public static final *;
}
在usage.txt我能看到的Facebook类,串成员,...
In usage.txt I can see the facebook classes, string members, ...
我固定它的规则如下(但是我不是专家,所以有可能是错误在那里)。
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>;
}