Module: FbGraph::Connections::MutualFriends

Included in:
User
Defined in:
lib/fb_graph/connections/mutual_friends.rb

Instance Method Summary collapse

Instance Method Details

#mutual_friends(friend, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/fb_graph/connections/mutual_friends.rb', line 4

def mutual_friends(friend, options = {})
  friends = self.connection :mutualfriends, options.merge(
    :connection_scope => connection_scope(friend)
  )
  friends.map! do |friend|
    User.new friend[:id], friend.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end