Class

FacebookSession

Extends:

There's no documentation for this item.

Classes
ExpiredSessionStandardError
NotActivatedStandardError
RemoteStandardError TODO: better exception classes in v1.0?
Public Attributes
logger Can be set to any valid logger (for example, RAIL_DEFAULT_LOGGER)
session_expires The expiration time of this session, as given from Facebook API login.
session_key The key for this session. You will need to save this for infinite sessions.
session_user_id The user id of the user associated with this sesssion.
Public Methods
_dump dump to a serialized string, removing the logger object (which cannot be serialized)
_load load from a serialized string
expired? Returns true if the session is expired (will often mean that the session is not ready as well)
is_activated? DEPRECATED
is_expired? DEPRECATED
is_ready? DEPRECATED
is_valid? DEPRECATED
last_error_code DEPRECATED
last_error_message DEPRECATED
new Constructs a FacebookSession.
quiet= Sets whether or not we suppress exceptions from being thrown
quiet? Returns true if exceptions are being suppressed in favor of log messages
ready? Template method. Returns true when the session is definitely prepared to make API calls.
signature Template method. Used for signing a set of parameters in the way that Facebook specifies: <developers.facebook.com/documentation.php?v=1.0&do...>
suppress_errors DEPRECATED
suppress_errors= DEPRECATED
Private Methods
handle_xml_response Wraps an XML response in a Facepricot XML document, and checks for an error response (raising or logging errors as needed)
log_debug log a debug message
log_info log an informational message
method_missing This allows any Facebook method to be called, using the Ruby mechanism for responding to unimplemented methods. Basically, this converts a call to "auth_getSession" to "auth.getSession" and does the proper API call using the parameter hash given.
post_request Posts a request to the remote Facebook API servers, and returns the raw text body of the result
remote_call Sets everything up to make a POST request to Facebook’s API servers.
signature_helper Generates a proper Facebook signature.
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.