在Facebook的Android SDK中3.14 Facebook好友列表 [英] Facebook friend list in Facebook Android SDK 3.14
本文介绍了在Facebook的Android SDK中3.14 Facebook好友列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图使用 Facebook的Android SDK中3.14
但得到没有结果
来获取好友列表。有人指出,谁使用我的应用程序的朋友只能检索
,但我想找回我的完整的好友列表
。谁能告诉我怎样才能做到这一点?
我用下面的code:
< code>
Request.executeMyFriendsRequestAsync(会话,新Request.GraphUserListCallback(){ @覆盖
公共无效onCompleted(列表< GraphUser>的用户,响应响应){
// TODO自动生成方法存根
Log.i(野马,反应;+ response.toString());
Log.i(野马,UserListSize:+ users.size());
}
});
谢谢,
解决方案
新的请求(
会议上,
/我的/朋友
空值,
HttpMethod.GET,
新Request.Callback(){
公共无效onCompleted(响应响应){
/ *处理结果* /
}
})executeAsync()。
权限:以user_friends用户访问令牌
权限才能查看当前人的朋友。
I am trying to get friend list using Facebook Android SDK 3.14
but getting no results
. Some pointed out that friends who are using my app can only be retrieved
but I want to retrieve my complete friend list
. Can anyone please tell me how can i achieve that?
I am using the following code:
<code>
Request.executeMyFriendsRequestAsync(session, new Request.GraphUserListCallback() {
@Override
public void onCompleted(List<GraphUser> users, Response response) {
// TODO Auto-generated method stub
Log.i("mustang", "response; " + response.toString());
Log.i("mustang", "UserListSize: " + users.size());
}
});
Thanks,
解决方案
new Request(
session,
"/me/friends",
null,
HttpMethod.GET,
new Request.Callback() {
public void onCompleted(Response response) {
/* handle the result */
}
}).executeAsync();
Permission: A user access token with "user_friends" permission is required to view the current person's friends.
这篇关于在Facebook的Android SDK中3.14 Facebook好友列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文