lib/fb_graph/connections/notes.rb in fb_graph-0.2.2 vs lib/fb_graph/connections/notes.rb in fb_graph-0.3.0
- old
+ new
@@ -2,16 +2,20 @@
module Connections
module Notes
def notes(options = {})
notes = FbGraph::Collection.new(get(options.merge(:connection => 'notes')))
notes.map! do |note|
- Note.new(note.delete(:id), note)
+ Note.new(note.delete(:id), note.merge(
+ :access_token => options[:access_token] || self.access_token
+ ))
end
end
def note!(options = {})
note = post(options.merge(:connection => 'notes'))
- Note.new(note.delete(:id), options.merge(note))
+ Note.new(note.delete(:id), options.merge(note).merge(
+ :access_token => options[:access_token] || self.access_token
+ ))
end
end
end
end
\ No newline at end of file