You are here

function hook_fb_autopost_publication_entity_publish in Facebook Autopost 7

Implements hook_fb_autopost_publication_entity_publish().

Parameters

FacebookPublicationEntity $publication: The publication entity that was just published.

array $result: The result that was returned from Facebook.

1 invocation of hook_fb_autopost_publication_entity_publish()
fb_autopost_entity_fb_autopost_publication_publish in fb_autopost_entity/fb_autopost_entity.module
Implements hook_fb_autopost_publication_publish().

File

./fb_autopost.api.php, line 36
Hook API examples for the Facebook Autopost module.

Code

function hook_fb_autopost_publication_entity_publish($publication, $result) {
  if (!empty($result) && isset($result['id'])) {
    $publication->facebook_id = $result['id'];

    // Update the publication with the ID returned from Facebook
    facebook_publication_save($publication);
  }
}