module FBGraphRails
FbgraphRails
Public Class Methods
config()
click to toggle source
# File lib/fbgraph_rails/fbgraph_client.rb, line 5 def self.config @config ||= config_without_caching end
config_without_caching()
click to toggle source
# File lib/fbgraph_rails/fbgraph_client.rb, line 9 def self.config_without_caching erb_file = File.read(Rails.root.join('config', 'fbgraph.yml')) YAML.load Erubis::Eruby.new(erb_file).result end
fbclient(access_token)
click to toggle source
# File lib/fbgraph_rails/fbgraph_client.rb, line 18 def self.fbclient(access_token) FBGraph::Client.new :client_id => config['id'], :token => access_token, :secret_id => config['secret'] end
global_fbclient()
click to toggle source
# File lib/fbgraph_rails/fbgraph_client.rb, line 14 def self.global_fbclient @client ||= new_global_fbclient end
new_global_fbclient()
click to toggle source
# File lib/fbgraph_rails/fbgraph_client.rb, line 23 def self.new_global_fbclient FBGraph::Client.new :client_id => config['id'], :secret_id => config['secret'] end