Class: Facebooker::ServerCache

Inherits:
Object
  • Object
show all
Defined in:
lib/facebooker/server_cache.rb

Instance Method Summary (collapse)

Constructor Details

- (ServerCache) initialize(session)

Returns a new instance of ServerCache



3
4
5
# File 'lib/facebooker/server_cache.rb', line 3

def initialize(session)
  @session = session
end

Instance Method Details

- (Object) refresh_img_src(url)



20
21
22
# File 'lib/facebooker/server_cache.rb', line 20

def refresh_img_src(url)
  (@session.post 'facebook.fbml.refreshImgSrc', {:url => url},false) == '1'
end

- (Object) refresh_ref_url(url)

Fetches and re-caches the content stored at the given URL, for use in a fb:ref FBML tag.



16
17
18
# File 'lib/facebooker/server_cache.rb', line 16

def refresh_ref_url(url)
  (@session.post 'facebook.fbml.refreshRefUrl', {:url => url},false) == '1'
end

- (Object) set_ref_handle(handle_name, fbml_source)

Stores an FBML reference on the server for use across multiple users in FBML



10
11
12
# File 'lib/facebooker/server_cache.rb', line 10

def set_ref_handle(handle_name, fbml_source)
  (@session.post 'facebook.fbml.setRefHandle', {:handle => handle_name, :fbml => fbml_source},false) == '1'
end