Skip to content

Instantly share code, notes, and snippets.

@nfo
nfo / gist:456198
Created June 28, 2010 18:41
Facebooker: replace session_key by access_token
# Monkey patch Facebooker to set an access token instead of a session key,
# and use the access token on EVERY requests.
Facebooker::Session.class_eval do
def post_without_logging_with_access_token(method, params = {}, use_session_key = true, &proc)
params[:access_token] ||= (params.delete(:session_key) || @session_key)
post_without_logging_without_access_token(method, params, false, &proc)
end
alias_method_chain :post_without_logging, :access_token
end