You are here

protected function FBAutopost::publishOn in Facebook Autopost 7

Publishes on a single destination.

Parameters

string $publication: The publication as described in FBAutopost::publish()

Return value

string The publication ID.

Throws

FacebookApiException

See also

FBAutopost::publish()

1 call to FBAutopost::publishOn()
FBAutopost::publish in class/FBAutopost.php
Publishes content in the selected pages

File

class/FBAutopost.php, line 227

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

protected function publishOn($publication) {
  $this
    ->publishParameterPrepare($publication);

  // Call api method from ancestor.
  $result = $this
    ->api('/' . $this
    ->getDestination() . '/' . $this
    ->getEndpoint(), 'POST', $publication['params']);
  module_invoke_all('fb_autopost_publication_publish', $publication, $result);
  return $result;
}