class FBAutopostEvent in Facebook Autopost 7
Special case for publication type Event
Hierarchy
- class \FBAutopost extends \Facebook
- class \FBAutopostEvent
Expanded class hierarchy of FBAutopostEvent
File
- class/
FBAutopostEvent.php, line 11 - Class implementation for FBAutopostEvent
View source
class FBAutopostEvent extends FBAutopost {
/**
* Prepares the parameters to publish to Facebook, this means setting any
* field or destination dependent configuration.
*/
protected function publishParameterPrepare(&$publication) {
parent::publishParameterPrepare($publication);
$timezone = new DateTimeZone(variable_get('date_default_timezone', 'Europe/London'));
if (is_numeric($publication['params']['start_time'])) {
$start = new DateTime('@' . $publication['params']['start_time'], $timezone);
$publication['params']['start_time'] = $start
->format(DateTime::ISO8601);
}
if (is_numeric($publication['params']['end_time'])) {
$end = new DateTime('@' . $publication['params']['end_time'], $timezone);
$publication['params']['end_time'] = $end
->format(DateTime::ISO8601);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FBAutopost:: |
private | property | Destination for the publication. An string with the page ID or 'me'. | |
FBAutopost:: |
public | property | Privacy setting for the publications. This property is made public because the getter method will give some formatting along with the property. | |
FBAutopost:: |
private | property | Publication types as defined in Facebook documentation Contains the name of the publication and the endpoint keyed by the machine name of the publication. | |
FBAutopost:: |
private | property | Boolean indicating wether to retry the publication or not when publishing on the user's timeline if the acting user does not have a valid access token. | |
FBAutopost:: |
private | property | Stored publication type. | |
FBAutopost:: |
private | function | Throws an exception if the selected page id is not among the authorized ones. | |
FBAutopost:: |
public | function | Gets the destination to publish to | |
FBAutopost:: |
protected | function | Gets the endpoint of a publication | |
FBAutopost:: |
private static | function | Get access tokens for publishing to several Facebook Pages | |
FBAutopost:: |
public | function | Gets the reply given from Facebook when asking for user account. | |
FBAutopost:: |
public | function | Gets the privacy value. | |
FBAutopost:: |
protected | function | Gets the publication type. | |
FBAutopost:: |
public | function | Gets the session object for sugar syntax. Factory method. | |
FBAutopost:: |
protected | function | Gets the publication type. | |
FBAutopost:: |
public | function | Checks if a user has an active access token. | |
FBAutopost:: |
constant | Constant indicating error code for an icorrect parameter | ||
FBAutopost:: |
constant | Constant indicating error code for a missing dependency | ||
FBAutopost:: |
constant | Constant indicating error code for a missing parameter | ||
FBAutopost:: |
function | Publishes content in the selected pages | ||
FBAutopost:: |
protected | function | Publishes on a single destination. | |
FBAutopost:: |
public | function | Deletes a publication from Facebook | |
FBAutopost:: |
public | function | Edits a publication from Facebook | |
FBAutopost:: |
constant | Constant indicating error code for a SDK thrown error | ||
FBAutopost:: |
public | function | Set the destination to publish to | |
FBAutopost:: |
public | function | Sets the privacy. | |
FBAutopost:: |
public | function | Sets the retry value. | |
FBAutopost:: |
public | function | Sets the type value. | |
FBAutopost:: |
function | |||
FBAutopostEvent:: |
protected | function |
Prepares the parameters to publish to Facebook, this means setting any
field or destination dependent configuration. Overrides FBAutopost:: |