Facebook的新的SDK - 没有能够得到好友列表 [英] Facebook new sdk - not able to get friends list

查看:233
本文介绍了Facebook的新的SDK - 没有能够得到好友列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在用的是新的 Facebook的-SDK 和使用hackbook例子来获得使用好友列表 FriendsList.java 文件。该好友列表活动被打死每次和我凑了logcat的这个错误:

I am using the new Facebook-sdk and using the hackbook example to get the list of friends using FriendsList.java file. The Friendlist Activity gets killed everytime and I am getting this error in the logcat:

11-18 16:20:51.141: ERROR/JavaBinder(7881): !!! FAILED BINDER TRANSACTION !!!.

这个问题是可重复的,每次。在配置文件中注释的朋友数量是4500。

The issue is reproducible everytime. Note number of friends in the profile are 4500.

11-18 16:19:27.932: DEBUG/Facebook-Util(7881): GET URL: https://api.facebook.com/restserver.php?access_token=**********&query=select+name%2C+current_location%2C+uid%2C+pic_square+from+user+where+uid+in+%28select+uid2+from+friend+where+uid1%3Dme%28%29%29+order+by+name&method=fql.query&format=json

11-18 16:20:50.982: WARN/InputManagerService(3426): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4665a200
11-18 16:20:51.141: ERROR/JavaBinder(7881): !!! FAILED BINDER TRANSACTION !!!

请帮忙!

推荐答案

我没有发布任何code,因为我用的是Facebook的SDK中的例子code提供的 Facebook的 - Hackbook例如对于Android 最后,我发现这个问题,并解决它。

I didnt post any code because I was using the example code of Facebook sdk available at Facebook - Hackbook example for Android. Finally I found the issue and solved it.

首先这个问题是不是在Facebook的SDK,但与响应的大小。如果你有超过4K的朋友在Facebook和您使用查询好友列表中的 fql.query 方法,那么JSON响应大小超过500KB。现在,如果你尝试过通过IPC这个500KB响应(意向额外数据)到另一个活动的过程中失败,原因!失败的粘结剂交易!! 在失败的粘结剂交易更多信息,可以在<一个发现href="http://stackoverflow.com/questions/6899724/avoiding-failed-binder-transaction-error-when-updating-lots-of-widget-bitmaps">Failed粘合剂交易讨论

First the issue is not in facebook sdk but with the size of the response. If you have more than 4k friends in facebook and you query for the friends list using fql.query or graph methods then the Json response size is more than 500kb. Now if you try to pass this 500kb response via IPC (Intent extra data) to another activity the process failed with reason !! Failed binder transaction !! More info on Failed binder transaction can be found at Failed binder transaction discussion

我该如何解决这个问题: 我用同样的方法在我上面贴的链接使用。即写响应文件和发送文件链接到其他活动,而不是全尺寸500KB响应。

How I solved this issue: I used the same procedure as used in the link I have posted above. I.e. writing the response to a file and sending the file link to the other activity instead of the full 500kb size response.

这篇关于Facebook的新的SDK - 没有能够得到好友列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆