0
我的疑問是,當我調用下面的方法時,值爲空,當然,因爲對象用戶它尚未填充,因爲將被填充到Facebook請求中。所以,問題是,我如何等待Facebook完成,然後返回用戶的正確arraylist?Facebook請求中的返回值OnComplete
public ArrayList<User> getUsers(){
ArrayList<User> users = new ArrayList<User>();
User user = new User();
//It's not the complete code
Facebook.resquest(){
@Override
onComplete(){
for(int i = 0;i<10;i++){
users.add(user)
}
}
}
// The question is, what do i have to do for the below object 'll have the same value of user object inside facebook request?
return users;
}