You are here

public function FBAutopost::remoteEdit in Facebook Autopost 7

Edits a publication from Facebook

Parameters

$publication: Keyed array containing the info for the publication. Must contain the keys:

  • 'type': The publication type as defined in $publication_types
  • 'params': Associative array with the necessary params for a successful FB publication

$publication_id: The id that identifies the publication in Facebook

File

class/FBAutopost.php, line 362

Class

FBAutopost
API class to handle common actions when autoposting This class uses FBAutopostException for error handling. Severity is passed resusing watchdog severity (See: http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/watch...)

Code

public function remoteEdit($publication, $publication_id) {

  // In this case, edit means delete + publish. This has the side effect that
  // the ID is not preserved.
  if ($this
    ->remoteDelete($publication)) {
    return $this
      ->publish($publication);
  }
}