class JFacebookEvent extends JFacebookObject

Facebook API User class for the Joomla Platform.

Methods

__construct( Registry $options = null, JHttp $client = null, JFacebookOAuth $oauth = null)

Constructor.

mixed
sendRequest( string $path, mixed $data = '', array $headers = null, integer $limit, integer $offset, string $until = null, string $since = null)

Method to send the request.

mixed
get( string $object)

Method to get an object.

mixed
getConnection( string $object, string $connection = null, string $extra_fields = '', integer $limit, integer $offset, string $until = null, string $since = null)

Method to get object's connection.

mixed
createConnection( string $object, string $connection = null, array $parameters = null, array $headers = null)

Method to create a connection.

mixed
deleteConnection( string $object, string $connection = null, string $extra_fields = '')

Method to delete a connection.

setOAuth( JFacebookOAuth $oauth)

Method used to set the OAuth client.

getOAuth()

Method used to get the OAuth client.

mixed
getEvent( string $event)

Method to get information about an event visible to the current user. Requires authentication.

mixed
getFeed( string $event, integer $limit, integer $offset, string $until = null, string $since = null)

Method to get the event's wall. Requires authentication.

mixed
createLink( string $event, string $link, string $message = null)

Method to post a link on event's feed which the currentuser is or maybe attending. Requires authentication and publishstream permission.

boolean
deleteLink( mixed $link)

Method to delete a link. Requires authentication and publish_stream permission.

mixed
createPost( string $event, string $message = null, string $link = null, string $picture = null, string $name = null, string $caption = null, string $description = null, array $actions = null)

Method to post on event's wall. Message or link parameter is required. Requires authentication and publish_stream permission.

boolean
deletePost( string $post)

Method to delete a post. Note: you can only delete the post if it was created by the current user.

mixed
createStatus( string $event, string $message)

Method to post a status message on behalf of the user on the event's wall. Requires authentication and publish_stream permission.

boolean
deleteStatus( string $status)

Method to delete a status. Note: you can only delete the post if it was created by the current user.

mixed
getInvited( string $event, integer $limit, integer $offset)

Method to get the list of invitees for the event. Requires authentication and userevents or friendsevents permission.

array
isInvited( string $event, mixed $user)

Method to check if a user is invited to the event. Requires authentication and userevents or friendsevents permission.

boolean
createInvite( string $event, string $users)

Method to invite users to the event. Requires authentication and create_event permission.

boolean
deleteInvite( string $event, string $user)

Method to delete an invitation. Note: you can only delete the invite if the current user is the event admin.

mixed
getAttending( string $event, integer $limit, integer $offset)

Method to get the list of attending users. Requires authentication and userevents or friendsevents permission.

array
isAttending( string $event, mixed $user)

Method to check if a user is attending an event. Requires authentication and userevents or friendsevents permission.

boolean
createAttending( string $event)

Method to set the current user as attending. Requires authentication and rsvp_event permission.

mixed
getMaybe( string $event, integer $limit, integer $offset)

Method to get the list of maybe attending users. Requires authentication and userevents or friendsevents permission.

array
isMaybe( string $event, mixed $user)

Method to check if a user is maybe attending an event. Requires authentication and userevents or friendsevents permission.

boolean
createMaybe( string $event)

Method to set the current user as maybe attending. Requires authentication and rscp_event permission.

mixed
getDeclined( string $event, integer $limit, integer $offset)

Method to get the list of users which declined the event. Requires authentication and userevents or friendsevents permission.

array
isDeclined( string $event, mixed $user)

Method to check if a user responded 'no' to the event. Requires authentication and userevents or friendsevents permission.

boolean
createDeclined( string $event)

Method to set the current user as declined. Requires authentication and rscp_event permission.

mixed
getNoreply( string $event, integer $limit, integer $offset)

Method to get the list of users which have not replied to the event. Requires authentication and userevents or friendsevents permission.

array
isNoreply( string $event, mixed $user)

Method to check if a user has not replied to the event. Requires authentication and userevents or friendsevents permission.

string
getPicture( string $event, boolean $redirect = true, string $type = null)

Method to get the event's profile picture. Requires authentication and userevents or friendsevents permission.

mixed
getPhotos( string $event, integer $limit, integer $offset, string $until = null, string $since = null)

Method to get photos published on event's wall. Requires authentication.

mixed
createPhoto( string $event, string $source, string $message = null)

Method to post a photo on event's wall. Requires authentication and publish_stream permission.

mixed
getVideos( string $event, integer $limit, integer $offset, string $until = null, string $since = null)

Method to get videos published on event's wall. Requires authentication.

mixed
createVideo( string $event, string $source, string $title = null, string $description = null)

Method to post a video on event's wall. Requires authentication and publish_stream permission.

Details

__construct( Registry $options = null, JHttp $client = null, JFacebookOAuth $oauth = null)

Constructor.

Parameters

Registry $options Facebook options object.
JHttp $client The HTTP client object.
JFacebookOAuth $oauth The OAuth client.

mixed sendRequest( string $path, mixed $data = '', array $headers = null, integer $limit, integer $offset, string $until = null, string $since = null)

Method to send the request.

Parameters

string $path The path of the request to make.
mixed $data Either an associative array or a string to be sent with the post request.
array $headers An array of name-value pairs to include in the header of the request
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

mixed The request response.

Exceptions

DomainException

mixed get( string $object)

Method to get an object.

Parameters

string $object The object id.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

mixed getConnection( string $object, string $connection = null, string $extra_fields = '', integer $limit, integer $offset, string $until = null, string $since = null)

Method to get object's connection.

Parameters

string $object The object id.
string $connection The object's connection name.
string $extra_fields URL fields.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

mixed createConnection( string $object, string $connection = null, array $parameters = null, array $headers = null)

Method to create a connection.

Parameters

string $object The object id.
string $connection The object's connection name.
array $parameters The POST request parameters.
array $headers An array of name-value pairs to include in the header of the request

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

mixed deleteConnection( string $object, string $connection = null, string $extra_fields = '')

Method to delete a connection.

Parameters

string $object The object id.
string $connection The object's connection name.
string $extra_fields URL fields.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

JFacebookObject setOAuth( JFacebookOAuth $oauth)

Method used to set the OAuth client.

Parameters

JFacebookOAuth $oauth The OAuth client object.

Return Value

JFacebookObject This object for method chaining.

JFacebookOAuth getOAuth()

Method used to get the OAuth client.

Return Value

JFacebookOAuth The OAuth client

mixed getEvent( string $event)

Method to get information about an event visible to the current user. Requires authentication.

Parameters

string $event The event id.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

mixed getFeed( string $event, integer $limit, integer $offset, string $until = null, string $since = null)

Method to get the event's wall. Requires authentication.

Parameters

string $event The event id.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

Method to post a link on event's feed which the currentuser is or maybe attending. Requires authentication and publishstream permission.

Parameters

string $event The event id.
string $link Link URL.
string $message Link message.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

Method to delete a link. Requires authentication and publish_stream permission.

Parameters

mixed $link The Link ID.

Return Value

boolean Returns true if successful, and false otherwise.

mixed createPost( string $event, string $message = null, string $link = null, string $picture = null, string $name = null, string $caption = null, string $description = null, array $actions = null)

Method to post on event's wall. Message or link parameter is required. Requires authentication and publish_stream permission.

Parameters

string $event The event id.
string $message Post message.
string $link Post URL.
string $picture Post thumbnail image (can only be used if link is specified)
string $name Post name (can only be used if link is specified).
string $caption Post caption (can only be used if link is specified).
string $description Post description (can only be used if link is specified).
array $actions Post actions array of objects containing name and link.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

boolean deletePost( string $post)

Method to delete a post. Note: you can only delete the post if it was created by the current user.

Requires authentication and publish_stream permission.

Parameters

string $post The Post ID.

Return Value

boolean Returns true if successful, and false otherwise.

mixed createStatus( string $event, string $message)

Method to post a status message on behalf of the user on the event's wall. Requires authentication and publish_stream permission.

Parameters

string $event The event id.
string $message Status message content.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

boolean deleteStatus( string $status)

Method to delete a status. Note: you can only delete the post if it was created by the current user.

Requires authentication and publish_stream permission.

Parameters

string $status The Status ID.

Return Value

boolean Returns true if successful, and false otherwise.

mixed getInvited( string $event, integer $limit, integer $offset)

Method to get the list of invitees for the event. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

array isInvited( string $event, mixed $user)

Method to check if a user is invited to the event. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
mixed $user Either an integer containing the user ID or a string containing the username.

Return Value

array The decoded JSON response or an empty array if the user is not invited.

boolean createInvite( string $event, string $users)

Method to invite users to the event. Requires authentication and create_event permission.

Parameters

string $event The event id.
string $users Comma separated list of user ids.

Return Value

boolean Returns true if successful, and false otherwise.

boolean deleteInvite( string $event, string $user)

Method to delete an invitation. Note: you can only delete the invite if the current user is the event admin.

Requires authentication and rsvp_event permission.

Parameters

string $event The event id.
string $user The user id.

Return Value

boolean Returns true if successful, and false otherwise.

mixed getAttending( string $event, integer $limit, integer $offset)

Method to get the list of attending users. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

array isAttending( string $event, mixed $user)

Method to check if a user is attending an event. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
mixed $user Either an integer containing the user ID or a string containing the username.

Return Value

array The decoded JSON response or an empty array if the user is not invited.

boolean createAttending( string $event)

Method to set the current user as attending. Requires authentication and rsvp_event permission.

Parameters

string $event The event id.

Return Value

boolean Returns true if successful, and false otherwise.

mixed getMaybe( string $event, integer $limit, integer $offset)

Method to get the list of maybe attending users. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

array isMaybe( string $event, mixed $user)

Method to check if a user is maybe attending an event. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
mixed $user Either an integer containing the user ID or a string containing the username.

Return Value

array The decoded JSON response or an empty array if the user is not invited.

boolean createMaybe( string $event)

Method to set the current user as maybe attending. Requires authentication and rscp_event permission.

Parameters

string $event The event id.

Return Value

boolean Returns true if successful, and false otherwise.

mixed getDeclined( string $event, integer $limit, integer $offset)

Method to get the list of users which declined the event. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

array isDeclined( string $event, mixed $user)

Method to check if a user responded 'no' to the event. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
mixed $user Either an integer containing the user ID or a string containing the username.

Return Value

array The decoded JSON response or an empty array if the user is not invited.

boolean createDeclined( string $event)

Method to set the current user as declined. Requires authentication and rscp_event permission.

Parameters

string $event The event id.

Return Value

boolean Returns true if successful, and false otherwise.

mixed getNoreply( string $event, integer $limit, integer $offset)

Method to get the list of users which have not replied to the event. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

array isNoreply( string $event, mixed $user)

Method to check if a user has not replied to the event. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
mixed $user Either an integer containing the user ID or a string containing the username.

Return Value

array The decoded JSON response or an empty array if the user is not invited.

string getPicture( string $event, boolean $redirect = true, string $type = null)

Method to get the event's profile picture. Requires authentication and userevents or friendsevents permission.

Parameters

string $event The event id.
boolean $redirect If false this will return the URL of the picture without a 302 redirect.
string $type To request a different photo use square | small | normal | large.

Return Value

string The URL to the event's profile picture.

mixed getPhotos( string $event, integer $limit, integer $offset, string $until = null, string $since = null)

Method to get photos published on event's wall. Requires authentication.

Parameters

string $event The event id.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

mixed createPhoto( string $event, string $source, string $message = null)

Method to post a photo on event's wall. Requires authentication and publish_stream permission.

Parameters

string $event The event id.
string $source Path to photo.
string $message Photo description.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

mixed getVideos( string $event, integer $limit, integer $offset, string $until = null, string $since = null)

Method to get videos published on event's wall. Requires authentication.

Parameters

string $event The event id.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.

mixed createVideo( string $event, string $source, string $title = null, string $description = null)

Method to post a video on event's wall. Requires authentication and publish_stream permission.

Parameters

string $event The event id.
string $source Path to photo.
string $title Video title.
string $description Video description.

Return Value

mixed The decoded JSON response or false if the client is not authenticated.