Event

Extends \Joomla\Facebook\Object

Facebook API User class for the Joomla Framework.

deprecated
link

https://developers.facebook.com/docs/reference/api/event/

since

1.0

deprecated

The joomla/facebook package is deprecated

Methods

__construct

Constructor.

__construct(array $options = array(), \Joomla\Http\Http $client = null, \Joomla\Facebook\OAuth $oauth = null) 
inherited
since

1.2.0

Arguments

$options

arrayFacebook options array.

$client

\Joomla\Http\HttpThe HTTP client object.

$oauth

\Joomla\Facebook\OAuthThe OAuth client.

createAttending

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

createAttending(string $event) : boolean
since

1.0

Arguments

$event

stringThe event id.

Response

booleanReturns true if successful, and false otherwise.

createConnection

Method to create a connection.

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

1.2.0

Arguments

$object

stringThe object id.

$connection

stringThe object's connection name.

$parameters

arrayThe POST request parameters.

$headers

arrayAn array of name-value pairs to include in the header of the request

Response

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

createDeclined

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

createDeclined(string $event) : boolean
since

1.0

Arguments

$event

stringThe event id.

Response

booleanReturns true if successful, and false otherwise.

createInvite

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

createInvite(string $event, string $users) : boolean
since

1.0

Arguments

$event

stringThe event id.

$users

stringComma separated list of user ids.

Response

booleanReturns true if successful, and false otherwise.

createMaybe

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

createMaybe(string $event) : boolean
since

1.0

Arguments

$event

stringThe event id.

Response

booleanReturns true if successful, and false otherwise.

createPhoto

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

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

1.0

Arguments

$event

stringThe event id.

$source

stringPath to photo.

$message

stringPhoto description.

Response

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

createPost

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

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

1.0

Arguments

$event

stringThe event id.

$message

stringPost message.

$link

stringPost URL.

$picture

stringPost thumbnail image (can only be used if link is specified)

$name

stringPost name (can only be used if link is specified).

$caption

stringPost caption (can only be used if link is specified).

$description

stringPost description (can only be used if link is specified).

$actions

arrayPost actions array of objects containing name and link.

Response

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

createStatus

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

createStatus(string $event, string $message) : mixed
since

1.0

Arguments

$event

stringThe event id.

$message

stringStatus message content.

Response

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

createVideo

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

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

1.0

Arguments

$event

stringThe event id.

$source

stringPath to photo.

$title

stringVideo title.

$description

stringVideo description.

Response

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

deleteConnection

Method to delete a connection.

deleteConnection(string $object, string $connection = null, string $extraFields = '') : mixed
inherited
since

1.2.0

Arguments

$object

stringThe object id.

$connection

stringThe object's connection name.

$extraFields

stringURL fields.

Response

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

deleteInvite

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

deleteInvite(string $event, string $user) : boolean

Requires authentication and rsvp_event permission.

since

1.0

Arguments

$event

stringThe event id.

$user

stringThe user id.

Response

booleanReturns true if successful, and false otherwise.

deletePost

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

deletePost(string $post) : boolean

Requires authentication and publish_stream permission.

since

1.0

Arguments

$post

stringThe Post ID.

Response

booleanReturns true if successful, and false otherwise.

deleteStatus

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

deleteStatus(string $status) : boolean

Requires authentication and publish_stream permission.

since

1.0

Arguments

$status

stringThe Status ID.

Response

booleanReturns true if successful, and false otherwise.

fetchUrl

Method to build and return a full request URL for the request. This method will add appropriate pagination details if necessary and also prepend the API url to have a complete URL for the request.

fetchUrl(string $path, integer $limit, integer $offset, string $until = null, string $since = null) : string
inherited
since

1.2.0

Arguments

$path

stringURL to inflect.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

stringThe request URL.

get

Method to get an object.

get(string $object) : mixed
inherited
since

1.2.0

Arguments

$object

stringThe object id.

Response

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

getAttending

Method to get the list of attending users. Requires authentication and user_events or friends_events permission.

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

1.0

Arguments

$event

stringThe event id.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

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

getConnection

Method to get object's connection.

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

1.2.0

Arguments

$object

stringThe object id.

$connection

stringThe object's connection name.

$extraFields

stringURL fields.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

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

getDeclined

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

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

1.0

Arguments

$event

stringThe event id.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

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

getEvent

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

getEvent(string $event) : mixed
since

1.0

Arguments

$event

stringThe event id.

Response

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

getFeed

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

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

1.0

Arguments

$event

stringThe event id.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

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

getInvited

Method to get the list of invitees for the event. Requires authentication and user_events or friends_events permission.

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

1.0

Arguments

$event

stringThe event id.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

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

getMaybe

Method to get the list of maybe attending users. Requires authentication and user_events or friends_events permission.

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

1.0

Arguments

$event

stringThe event id.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

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

getNoreply

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

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

1.0

Arguments

$event

stringThe event id.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

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

getOauth

Method used to get the OAuth client.

getOauth() : \Joomla\Facebook\OAuth
inherited
since

1.2.0

Response

\Joomla\Facebook\OAuthThe OAuth client

getPhotos

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

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

1.0

Arguments

$event

stringThe event id.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

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

getPicture

Method to get the event's profile picture. Requires authentication and user_events or friends_events permission.

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

1.0

Arguments

$event

stringThe event id.

$redirect

booleanIf false this will return the URL of the picture without a 302 redirect.

$type

stringTo request a different photo use square | small | normal | large.

Response

stringThe URL to the event's profile picture.

getVideos

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

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

1.0

Arguments

$event

stringThe event id.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

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

isAttending

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

isAttending(string $event, mixed $user) : array
since

1.0

Arguments

$event

stringThe event id.

$user

mixedEither an integer containing the user ID or a string containing the username.

Response

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

isDeclined

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

isDeclined(string $event, mixed $user) : array
since

1.0

Arguments

$event

stringThe event id.

$user

mixedEither an integer containing the user ID or a string containing the username.

Response

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

isInvited

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

isInvited(string $event, mixed $user) : array
since

1.0

Arguments

$event

stringThe event id.

$user

mixedEither an integer containing the user ID or a string containing the username.

Response

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

isMaybe

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

isMaybe(string $event, mixed $user) : array
since

1.0

Arguments

$event

stringThe event id.

$user

mixedEither an integer containing the user ID or a string containing the username.

Response

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

isNoreply

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

isNoreply(string $event, mixed $user) : array
since

1.0

Arguments

$event

stringThe event id.

$user

mixedEither an integer containing the user ID or a string containing the username.

Response

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

sendRequest

Method to send the request.

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

1.2.0

throws

\RuntimeException

Arguments

$path

stringThe path of the request to make.

$data

mixedEither an associative array or a string to be sent with the post request.

$headers

arrayAn array of name-value pairs to include in the header of the request

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe request response.

setOauth

Method used to set the OAuth client.

setOauth(\Joomla\Facebook\OAuth $oauth) : \Joomla\Facebook\AbstractFacebookObject
inherited
since

1.2.0

Arguments

$oauth

\Joomla\Facebook\OAuthThe OAuth client object.

Response

\Joomla\Facebook\AbstractFacebookObjectThis object for method chaining.

Properties

options

Options for the Facebook object.

inherited
since

1.2.0

Type(s)

array

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.2.0

Type(s)

\Joomla\Http\Http

oauth

The OAuth client.

inherited
since

1.2.0

Type(s)

\Joomla\Facebook\OAuth