/** * Publishes content stored in a Facebook publication entity * * @param FacebookPublicationEntity $publication * The fully loaded Facebook publication entity. * @param string $page_id * Page id (among those already selected via UI). * If this is present it will override the parameter destination. * Use 'me' to publish to the user's timeline * * @return string * Facebook id string for the publication. Needed to edit, or delete the * publication. * * @throws FBAutopostException * @see FBAutopost::publish() */ public function publishEntity(FacebookPublicationEntity $publication, string $page_id = NULL) { // Invoke FBAutopost::publish() with the parameters from $publication. return parent::publish(array('type' => $publication->type, 'params' => fb_autopost_entity_get_properties($publication), 'entity' => serialize($publication)), $page_id); }