You are here

function fb_stream_fb in Drupal for Facebook 6.3

Same name and namespace in other branches
  1. 6.2 fb_stream.module \fb_stream_fb()
  2. 7.3 fb_stream.module \fb_stream_fb()

Implementation of hook_fb().

When adding javascript to FBML and Conect pages, we add

File

./fb_stream.module, line 418
Support for Facebook's Stream API.

Code

function fb_stream_fb($op, $data, &$return) {
  if ($op == FB_OP_JS) {
    $params_array = fb_stream_get_stream_dialog_data($data['fb_app']);
    $js = fb_stream_js($params_array);
    $return += $js;
  }
  if ($op == FB_OP_POST_INIT) {
    drupal_add_js(drupal_get_path('module', 'fb_stream') . '/fb_stream.js');
  }
}