Added a FQL approach which turns out to be much more straight forward. Only concern is that querying on all friends can be time consuming...