문제

I am using spring social api to create a facebook application. I am using List<Reference> friends = facebook.friendOperations().getFriends(); to get a list of my friends. I want to print out the list but when i do it just prints out

[org.springframework.social.facebook.api.Reference@7606931d,

I have tried using the

@Override
public String toString() {
    return ToStringBuilder.reflectionToString(this);
}

But it still just prints out the references. Is there anyway to print out what i need?

도움이 되었습니까?

해결책

Loop through the list of references, and print each of them individually, like this:

for (Reference friend : friends) {
    System.out.println(friend.getName());
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top