无法让任何 Facebook API 在 Android 上运行
我在这里拔掉我的头发。我一直在尝试让任何 Facebook API 在我的 Android 应用程序中运行,但没有成功。
我已经尝试过官方 SDK,它只给我 LogCat 错误,例如:
04-26 15:27:06.663: 调试/Facebook-authorize(5299): 登录失败:invalid_key
尽管后面是:
04-26 15:27:06.710: DEBUG/FacewebAuthentication(5306): 身份验证成功
我不知道如何使用 FacewebAuthentication,因此总是调用 onFacebookError() 方法。
这是我放弃官方api并决定尝试fbrocket的时候。
但是在尝试使用相同的代码使用它之后, FbRocket 给了我:
Facebook 服务器错误 104 + 签名不正确
我无法在 Eclipse 中正确编译 FbConnect 。
至于 Easy Facebook Android SDK,我设法让它发布到我的状态一次,但从那以后它就没有了无法执行任何操作,并且总是到达 OnError() 函数。
我只是希望能够发布到墙上,也许可以通过 REST 或 Graph API 来利用朋友。
I'm pulling my hair out here. I've been trying to get any of the Facebook APIs working in my Android app to no avail.
I've tried the official SDK which just gives me LogCat errors such as:
04-26 15:27:06.663: DEBUG/Facebook-authorize(5299): Login failed: invalid_key
although this is followed by:
04-26 15:27:06.710: DEBUG/FacewebAuthentication(5306): authentication succeeded
I don't know how to make use of the FacewebAuthentication and so the onFacebookError() method is just always called.
This is when I gave up on the official api and decided to try fbrocket.
But after trying to use it with the same code, FbRocket gives me:
facebook server error 104 + incorrect signature
I can't get FbConnect to compile properly in Eclipse.
As for Easy Facebook Android SDK, I managed to get it to post to my status ONCE but since then it hasn't been able to do anything and just always reaches the OnError() function.
I just want to be able to post to the wall and maybe leverage the friends either by REST or Graph API.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您所看到的是如果应用程序尚未在 Facebook 网站上使用其密钥哈希进行配置的错误。以下是 Facebook 网站上的文档:
https://developers.facebook.com/ docs/guides/mobile/#android
需要注意的是,请确保使用正确的密钥哈希。因此,如果您在调试中进行测试,请使用上面文档中使用 debug.keystore 密钥的命令行,但是一旦准备好投入生产,您必须在命令中使用生产签名密钥:
希望我正确猜测问题的根源。
I think what you are seeing are the errors if the App hasn't been configured on the Facebook web site with it's key hash. Here are the docs from the Facebook web site:
https://developers.facebook.com/docs/guides/mobile/#android
Something to note, is to be sure to use the correct key hash. So if you're testing in debug use the command line in the docs above that uses your debug.keystore keys, but once you are ready to push into production you have to use your production signing key in the command:
Hopefully I'm guessing the source of the problem correctly.