[英]facebook working on emulator not on device
Its working perfectly on emulator but not on device.它可以在模拟器上完美运行,但不能在设备上运行。
crashing at response = read(conn.getInputStream());
response = read(conn.getInputStream());
崩溃response = read(conn.getInputStream());
in facebook sdk.在 facebook sdk 中。
Yeah I had this issue,是的,我有这个问题,
It worked fine on the emulator, worked fine on my dev phone, but failed on the test users phone.它在模拟器上运行良好,在我的开发手机上运行良好,但在测试用户手机上运行失败。
It's to do with the Facebook app and SSO.这与 Facebook 应用程序和 SSO 有关。
Have a read of this : http://sean.lyn.ch/2011/07/android-the-facebook-sdk-sso-and-you/阅读一下: http : //sean.lyn.ch/2011/07/android-the-facebook-sdk-sso-and-you/
It has 3 solutions.它有3个解决方案。
I couldn't get SSO to work so I went for option two, (opt out of SSO!) This is done by:我无法让 SSO 工作,所以我选择了选项二,(选择退出 SSO!)这是通过以下方式完成的:
facebook.authorize(this, PERMISSIONS, Facebook.FORCE_DIALOG_AUTH, this); facebook.authorize(this, PERMISSIONS, Facebook.FORCE_DIALOG_AUTH, this); If you want to fix it and get SSO to work:
如果您想修复它并使 SSO 工作:
Correctly generate your hash key for the debug apk certificate.正确生成调试 apk 证书的哈希密钥。 (detailed in the link above).
(在上面的链接中有详细说明)。
Ref:参考:
https://stackoverflow.com/a/7158056/1838457 https://stackoverflow.com/a/7158056/1838457
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.