You are here

function rules_action_delete_from_facebook in Facebook Autopost 7

Deletes a publication from Facebook.

1 string reference to 'rules_action_delete_from_facebook'
fb_autopost_entity_rules_action_info in fb_autopost_entity/fb_autopost_entity.rules.inc
Implements hook_rules_action_info().

File

fb_autopost_entity/fb_autopost_entity.rules.inc, line 204
Rules integration.

Code

function rules_action_delete_from_facebook(FacebookPublicationEntity $publication) {
  try {
    $fb = facebook_autopost_entity($publication->type);
    $fb
      ->remoteEntityDelete($publication);
  } catch (Exception $e) {
    watchdog_exception('fb_autopost', $e);
    drupal_set_message($e
      ->getMessage(), 'error');
  }
}