Displaying 1 result from an estimated 1 matches for "friends_array".
2008 May 06
1
check_friendship method only returning value of last pair
...#for each of current_user''s friends, check if they are friends
with the member and return an array of only the mutual friends
@mutual_friends = [] #initializing array to store mutual friends
#create an array in the format of
[[friend1ID,memberID],[friend2ID,memberID]...]
@friends_array = @current_user.friends.map {|friend|
[friend.id, at member.id]}
#submit that array to check_friendship and store the resultant
hash, which should have format
{[friend1ID,memberID]=>true,[friend2ID,memberID]=>false}
@friends_hash = facebook_session.check_friendship(@friends_array)...