Module RFacebook::Rails::ControllerExtensions
In: controller_extensions.rb

Constants

FACEBOOK_SIGNATURE_TIME_SLACK = 30*60   signatures are allowed at most a 30 minute delta in the sig_time

Core API variables

Public Instance methods

Facebook API key, as parsed from the YAML file

Facebook API secret, as parsed from the YAML file

Facebook callback path, as parsed from the YAML file (may be nil if this application is an external app)

Facebook canvas path, as parsed from the YAML file (may be nil if this application is an external app)

Special Facebook variables

Public Instance methods

Accessor for all params beginning with "fb_sig_". The signature is verified to prevent replay attacks and other calls that don‘t originate from Facebook. (the "fb_sig_" prefix is removed from the parameter name)

Gives direct access to a Facebook session (of type RFacebook::FacebookWebSession) for this user. An attempt will be made to activate this session (either using canvas params or an auth_token for external apps), but if the user has not been forced to log in to Facebook, the session will NOT be ready for usage. To double-check this, simply call ‘ready?’ to see if the session is okay to use.

Facebook helper methods

Public Instance methods

returns true if the user has added (installed) the current application

returns true if the fb_sig_* parameters have been verified with a correct signature

this is a callback method for EXTERNAL web applications, you should define this method to do something (for example, redirect the user to your main page, etc.)

returns true if the current request is an FBJS ajax request

returns true if the user is viewing the page from an external website

returns true if the user is viewing the page in the canvas

returns true if the user is viewing the page in an iframe

returns true if the current request is a mock-ajax request

clear the current session so that a new user can log in

before_filters

Public Instance methods

force the user to install your Facebook application

force the user to log in to Facebook

Debug panel

Public Instance methods

returns HTML containing information about the current environment (API key, API secret, etc.)

used for the debug panel, runs a series of tests to determine what might be wrong with your particular environment

special rendering method to use when debugging