You are here

function fb_post_node_insert in Drupal for Facebook 7.4

Implements hook_node_insert().

File

./fb_post.module, line 232

Code

function fb_post_node_insert($node) {
  if (isset($node->fb_post_settings) && $node->fb_post_settings['status']) {

    // Using site-wide settings.
    $result = fb_post_publish_node($node->fb_post_settings, $node);
  }
  if (isset($node->fb_post_user_settings) && $node->fb_post_user_settings['status']) {

    // Using user specific settings.
    $result = fb_post_publish_node($node->fb_post_user_settings, $node);
  }
}