Module: FbGraph::Connections::FriendLists

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

Instance Method Summary collapse

Instance Method Details

#friend_list!(options = {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/fb_graph/connections/friend_lists.rb', line 13

def friend_list!(options = {})
  friend_list = post options.merge(:connection => :friendlists)
  FriendList.new friend_list[:id], options.merge(friend_list).merge(
    :access_token => options[:access_token] || self.access_token
  )
end

#friend_lists(options = {}) ⇒ Object



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

def friend_lists(options = {})
  friend_lists = self.connection :friendlists, options
  friend_lists.map! do |friend_list|
    FriendList.new friend_list[:id], friend_list.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end