Module: FbGraph::Connections::Checkins

Included in:
Page, User
Defined in:
lib/fb_graph/connections/checkins.rb

Overview

Fetch checkins

  • To get a user’s check-ins, request the “user_checkins”.

  • To see the user’s friends’ check-ins, request the “friends_checkins”.

ref) developers.facebook.com/docs/api#places

FbGraph::User.new("matake").checkins(:access_token => ACCESS_TOKEN)
FbGraph::Page.new("Tokyo").checkins(:access_token => ACCESS_TOKEN)

Instance Method Summary collapse

Instance Method Details

#checkins(options = {}) ⇒ Object



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

def checkins(options = {})
  checkins = self.connection(:checkins, options)
  checkins.map! do |checkin|
    FbGraph::Checkin.new(checkin.delete(:id), checkin.merge(
      :access_token => options[:access_token] || self.access_token
    ))
  end
end