Android的:获取好友列表为空的Facebook SDK 3.8 [英] Android: Getting Friends List Empty Facebook SDK 3.8

查看:1940
本文介绍了Android的:获取好友列表为空的Facebook SDK 3.8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图获取的朋友'在列表的Facebook SDK 3.8 ,但它返回空的用户列表
我还设置 user_friends 的权限。请看下面的code。

I am trying to fetch friends' list in Facebook SDK 3.8 but it returning Empty User List. I have also set the permissions of user_friends. Please see the following code.

<code>
    LoginButton loginButton = (LoginButton) findViewById(R.id.login_button);
    loginButton.setReadPermissions(Arrays.asList("user_friends"));

    Request request = Request.newMyFriendsRequest(session, new Request.GraphUserListCallback() {

                    @Override
                    public void onCompleted(List<GraphUser> users, Response response) {
                        Log.i("activitytag", "UserListSize: " + users.size());

                    }
                });
                request.executeAsync();
</code>

我收到 UserListSize 0 。任何人都可以请点我出去,我错过了什么。

I am getting the UserListSize to 0. Can anyone please point me out what I am missing.

谢谢,

推荐答案

在Facebook的API 2.0版有没有办法让所有的朋友列表。
但如果你想要得到的只是在游戏中所有的好友列表中,那么你可以调用
无论

In facebook api v2.0 has no way to get all friends list. but if you want to get all friend list ONLY IN GAME then you can call Either

Invitable好友列表:
你可以使用的https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends API。
要么
Taggable好友列表:

Invitable Friends List: you may use the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends API. OR Taggable Friends List:

https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends

有关详细情况请查阅Facebook的更改日志:

for more detail please read facebook change log:

Facebook的更改日志

这篇关于Android的:获取好友列表为空的Facebook SDK 3.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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