You are here

function fbconnect_stream_publish_nodeapi in Facebook Connect 6.2

Implements hook_nodeapi().

File

fbconnect_stream_publish/fbconnect_stream_publish.module, line 37
@todo.

Code

function fbconnect_stream_publish_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  if ($op == 'validate' && isset($a3['form_id']['#post']['fbconnect_feed'])) {
    $_SESSION['fbconnect_feed']['submit'] = TRUE;
  }
  if ($op == 'insert' && $_SESSION['fbconnect_feed']['submit'] === TRUE) {
    $_SESSION['fbconnect_feed'] = array(
      'type' => 'node',
      'title' => $node->title,
      'nodeurl' => url('node/' . $node->nid, array(
        'absolute' => TRUE,
      )),
    );
  }
}