You are here

function fboauth_action_display in Facebook OAuth (FBOAuth) 7

Same name and namespace in other branches
  1. 6 fboauth.module \fboauth_action_display()
  2. 7.2 fboauth.module \fboauth_action_display()

Output a Facebook link.

This is simply a convenience function for outputing a link. If wanting to customize the display of the link, override the theme_fboauth_action__connect() function in your theme.

Parameters

$action_name: The name of the action to display (usually as a link or button). Facebook OAuth includes the "connect" and "deauth" actions by default.

$redirect: An optional URL to redirect the user to after the action is completed. Note that if a destination is set in the URL through $_GET['destination'], that destination will take precedence.

$app_id: The optional Facebook App ID under which this action will be executed. If omitted the default App ID is used.

See also

theme_fboauth_action()

3 calls to fboauth_action_display()
fboauth_block_view in ./fboauth.module
Implements hook_block_view().
theme_fboauth_user_form_connect in ./fboauth.module
Display the Facebook Connect options on a user's profile form.
theme_fboauth_user_info in includes/fboauth.pages.inc
Provided themed information about the user's current Facebook connection.

File

./fboauth.module, line 328

Code

function fboauth_action_display($action_name, $redirect = NULL, $app_id = NULL) {

  // Use the default App ID if not specified.
  $app_id = isset($app_id) ? $app_id : variable_get('fboauth_id', '');
  $action = fboauth_action_load($action_name);
  $link = fboauth_action_link_properties($action_name, $redirect, $app_id);
  $theme = isset($action['theme']) ? $action['theme'] : array(
    'fboauth_action__' . $action_name,
    'fboauth_action',
  );
  return theme($theme, array(
    'action' => $action,
    'properties' => $link,
  ));
}