我正在尝试检索所有朋友的列表,但它总是返回一个零大小的列表......没有例外也没有失败......
我正在使用以下权限:
Permission[] permissions = new Permission[] {
Permission.BASIC_INFO,
Permission.READ_FRIENDLISTS
};
我正在使用以下代码:
private static OnFriendsListener mOnFriendsListener = new OnFriendsListener()
{
@Override
public void onComplete(List<Profile> friends)
{
L.d(FacebookHelper.class, "OnFriendsListener::onComplete");
BusProvider.getInstance().post(new FacebookEvent(Type.Friends, friends));
}
@Override
public void onException(Throwable throwable)
{
L.d(FacebookHelper.class, "OnFriendsListener::onException");
L.e(FacebookHelper.class, new Exception(throwable));
}
@Override
public void onThinking()
{
}
@Override
public void onFail(String reason)
{
L.d(FacebookHelper.class, "OnFriendsListener::onFail");
}
};
public static void getFriends(SimpleFacebook simpleFacebook)
{
PictureAttributes pictureAttributes = Attributes.createPictureAttributes();
pictureAttributes.setType(PictureType.SMALL);
Properties properties = new Properties.Builder()
.add(Properties.ID)
.add(Properties.FIRST_NAME)
.add(Properties.LAST_NAME)
.add(Properties.PICTURE, pictureAttributes)
.add(Properties.BIRTHDAY).build();
simpleFacebook.getFriends(properties, mOnFriendsListener);
}
有人可以帮我解决这个问题吗?