简体   繁体   English

使用Proguard在Facebook SDK 3.0中发布不起作用

[英]Publish not working in Facebook SDK 3.0 with proguard

My android app works perfectly when used without Proguard, but when used with Proguard I do get the user_info permission but am not getting the publish_actions permission. 我的android应用程序在不使用Proguard的情况下可以完美运行,但是当与Proguard一起使用时,我确实获得了user_info权限,但没有获得publish_actions权限。

I even tried 我什至试过

-keep class com.facebook.*
-keep class com.facebook.android.*
-keep class com.myapp.classcallingfb

but this too did not help. 但这也无济于事。

I even tried upgrading to FB Android SDK 3.0.1 but it did not work. 我什至尝试升级到FB Android SDK 3.0.1,但没有成功。

Can you please suggest a solution to this problem, a hacky solution would suffice just so that I can still use Proguard and protect my code. 您能提出一个解决此问题的方法吗,一个hacky解决方案就足够了,这样我仍然可以使用Proguard并保护我的代码。

Posting link as answer. 发布链接作为答案。 Combine answer in the other question with what you have above. 将其他问题的答案与上面的内容结合起来。

This is mainly because there some code in the SDK that uses reflection to make graph requests, and that doesn't jive well with Proguard. 这主要是因为SDK中存在一些代码,这些代码使用反射来发出图形请求,并且与Proguard结合得不好。

Error on using proguard with Android Facebook sdk 3.0 在Android Facebook sdk 3.0中使用proguard时出错

I got the same Problem, but in my case the problem was not proguard. 我遇到了同样的问题,但就我而言,这个问题不是保护者。 The api key changed after signed export. 签名导出后,api密钥已更改。

My solution was to figure out the new key. 我的解决方案是找出新密钥。 Look here (step 2): 看这里(第2步):

http://www.helloandroid.com/tutorials/using-facebook-sdk-android-development-part-1 http://www.helloandroid.com/tutorials/using-facebook-sdk-android-development-part-1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM