JFacebookEvent
Extends \JFacebookObjectFacebook API User class for the Joomla Platform.
link | |
---|---|
since |
3.2.0 |
deprecated |
4.0 Use the |
package |
Joomla.Platform |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry $options = null, \JHttp $client = null, \JFacebookOAuth $oauth = null)
since |
3.2.0 |
---|
Arguments
- $options
\Joomla\Registry\Registry
Facebook options object.- $client
\JHttp
The HTTP client object.- $oauth
\JFacebookOAuth
The OAuth client.
createAttending
Method to set the current user as attending. Requires authentication and rsvp_event permission.
createAttending(string $event) : boolean
since |
3.2.0 |
---|
Arguments
- $event
string
The event id.
Response
boolean
Returns true if successful, and false otherwise.
createConnection
Method to create a connection.
createConnection(string $object, string $connection = null, array $parameters = null, array $headers = null) : mixed
since |
3.2.0 |
---|
Arguments
- $object
string
The object id.- $connection
string
The object's connection name.- $parameters
array
The POST request parameters.- $headers
array
An array of name-value pairs to include in the header of the request
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.
Response
boolean
Returns 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $users
string
Comma separated list of user ids.
Response
boolean
Returns true if successful, and false otherwise.
createLink
Method to post a link on event's feed which the current_user is or maybe attending. Requires authentication and publish_stream permission.
createLink(string $event, string $link, string $message = null) : mixed
since |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $link
string
Link URL.- $message
string
Link message.
Response
mixed
The decoded JSON response or false if the client is not authenticated.
createMaybe
Method to set the current user as maybe attending. Requires authentication and rscp_event permission.
createMaybe(string $event) : boolean
since |
3.2.0 |
---|
Arguments
- $event
string
The event id.
Response
boolean
Returns 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $source
string
Path to photo.- $message
string
Photo description.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $message
string
Post message.- $link
string
Post URL.- $picture
string
Post thumbnail image (can only be used if link is specified)- $name
string
Post name (can only be used if link is specified).- $caption
string
Post caption (can only be used if link is specified).- $description
string
Post description (can only be used if link is specified).- $actions
array
Post actions array of objects containing name and link.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $message
string
Status message content.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $source
string
Path to photo.- $title
string
Video title.- $description
string
Video description.
Response
mixed
The 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
since |
3.2.0 |
---|
Arguments
- $object
string
The object id.- $connection
string
The object's connection name.- $extraFields
string
URL fields.
Response
mixed
The decoded JSON response or false if the client is not authenticated.
deleteInvite
Method to delete an 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $user
string
The user id.
Response
boolean
Returns true if successful, and false otherwise.
deleteLink
Method to delete a link. Requires authentication and publish_stream permission.
deleteLink(mixed $link) : boolean
since |
3.2.0 |
---|
Arguments
- $link
mixed
The Link ID.
Response
boolean
Returns 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 |
3.2.0 |
---|
Arguments
- $post
string
The Post ID.
Response
boolean
Returns 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 |
3.2.0 |
---|
Arguments
- $status
string
The Status ID.
Response
boolean
Returns 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, integer $until = null, integer $since = null) : string
since |
3.2.0 |
---|
Arguments
- $path
string
URL to inflect.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
integer
A unix timestamp or any date accepted by strtotime.- $since
integer
A unix timestamp or any date accepted by strtotime.
Response
string
The request URL.
get
Method to get an object.
get(string $object) : mixed
since |
3.2.0 |
---|
Arguments
- $object
string
The object id.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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
since |
3.2.0 |
---|
Arguments
- $object
string
The object id.- $connection
string
The object's connection name.- $extraFields
string
URL fields.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The decoded JSON response or false if the client is not authenticated.
getOAuth
Method used to get the OAuth client.
getOAuth() : \JFacebookOAuth
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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $redirect
boolean
If false this will return the URL of the picture without a 302 redirect.- $type
string
To request a different photo use square | small | normal | large.
Response
string
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $user
mixed
Either an integer containing the user ID or a string containing the username.
Response
array
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $user
mixed
Either an integer containing the user ID or a string containing the username.
Response
array
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $user
mixed
Either an integer containing the user ID or a string containing the username.
Response
array
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $user
mixed
Either an integer containing the user ID or a string containing the username.
Response
array
The 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 |
3.2.0 |
---|
Arguments
- $event
string
The event id.- $user
mixed
Either an integer containing the user ID or a string containing the username.
Response
array
The 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 = null, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since |
3.2.0 |
---|---|
throws |
|
Arguments
- $path
string
The path of the request to make.- $data
mixed
Either an associative array or a string to be sent with the post request.- $headers
array
An array of name-value pairs to include in the header of the request- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The request response.
setOAuth
Method used to set the OAuth client.
setOAuth(\JFacebookOAuth $oauth) : \JFacebookObject
since |
3.2.0 |
---|
Arguments
- $oauth
\JFacebookOAuth
The OAuth client object.
Response
\JFacebookObject
This object for method chaining.
Properties
client
The HTTP client object to use in sending HTTP requests.
since |
3.2.0 |
---|
Type(s)
\JHttp