Reputation: 3755
My doubt is, when i call a method below, the value is null, of course, because the object user it's not already populated, because will be populated inside Facebook request. So, the question is, how can i wait for the facebook complete and then return the right arraylist of users?
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;
}
Upvotes: 0
Views: 155