search for: check_friendship

Displaying 1 result from an estimated 1 matches for "check_friendship".

2008 May 06
1
check_friendship method only returning value of last pair
...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) # for each value in the returned hash, store the friendID if value is true @friends_hash.each {|key,va...