You are here

function fb_stream_fb in Drupal for Facebook 6.2

Same name and namespace in other branches
  1. 6.3 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 84
Support for Facebook's Stream API.

Code

function fb_stream_fb($op, $data, &$return) {
  if ($op == FB_OP_CONNECT_JS_INIT || $op == FB_OP_CANVAS_FBJS_INIT) {

    // arguments for JS and FBJS methods are the same!
    $params_array = fb_stream_get_stream_dialog_data($data['fb_app']);
    $js = fb_stream_js($params_array);
    $return += $js;
  }
}