Class: FBCLI::Actions

Inherits:
Object
  • Object
show all
Defined in:
lib/fbcli/actions.rb

Class Method Summary collapse

Class Method Details

.api_objectObject



6
7
8
9
10
11
12
13
14
# File 'lib/fbcli/actions.rb', line 6

def self.api_object
  config_file = File.expand_path("~/.fbcli.yml", File.dirname(__FILE__))
  if File.exists?(config_file)
    oauth_access_token = YAML.load_file(config_file)['oauth_access_token']
    @graph = Koala::Facebook::API.new(oauth_access_token)
  else
    raise "Use fbcli configure          to configure this application"
  end
end

.meObject



16
17
18
# File 'lib/fbcli/actions.rb', line 16

def self.me
  api_object.get_connections("me", "")
end