Permalink
Browse files

Rohit/Sumedha fixed an issue with array for friend's data

  • Loading branch information...
rohitggarg committed Mar 7, 2013
1 parent f65abb0 commit 949d7c2ac18432b03f3e585e818204ea4792c769
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/facebook_share_widget/facebook_helper.rb
@@ -44,7 +44,7 @@ def fb_friends_personal_data personal_data_type
data = Hash.new(0)
FbGraph::Query.new("SELECT uid, name, #{personal_data_type} FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND #{personal_data_type}").
fetch(self.facebook_access_token).each do|f|
- data[get_data_array_for(personal_data_type, f, true)] += 1
+ data[get_data_array_for(personal_data_type, f, true).first] += 1
end
Hash[data.sort {|a,b| b[1]<=>a[1]}].keys[0..4]
end

0 comments on commit 949d7c2

Please sign in to comment.