You are here

function fb_stream_node_insert in Drupal for Facebook 7.3

Implements hook_node_insert().

Post to facebook stream when new node is created.

File

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

Code

function fb_stream_node_insert($node) {

  // Defer any contact with Facebook until later, after all node hooks have run.
  // Facebook will visit our URL to get any graph tags, but Drupal will not
  // properly return the page if insert is not complete.
  drupal_register_shutdown_function('fb_stream_post_on_shutdown', $node);
}