JFacebookAlbum

Extends \JFacebookObject

Facebook API Album class for the Joomla Platform.

deprecated
link

http://developers.facebook.com/docs/reference/api/album/

since

3.2.0

deprecated

4.0 Use the joomla/facebook package via Composer instead

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options = null, \JHttp $client = null, \JFacebookOAuth $oauth = null) 
inherited
since

3.2.0

Arguments

$options

\Joomla\Registry\RegistryFacebook options object.

$client

\JHttpThe HTTP client object.

$oauth

\JFacebookOAuthThe OAuth client.

createComment

Method to comment on an album. Requires authentication and publish_stream permission.

createComment(string $album, string $message) : mixed
since

3.2.0

Arguments

$album

stringThe album id.

$message

stringThe comment's text.

Response

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

createConnection

Method to create a connection.

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

3.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.

createLike

Method to like an album. Requires authentication and publish_stream permission.

createLike(string $album) : boolean
since

3.2.0

Arguments

$album

stringThe album id.

Response

booleanReturns true if successful, and false otherwise.

createPhoto

Method to add photos to an album. Note: check can_upload flag first. Requires authentication and publish_stream permission.

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

3.2.0

Arguments

$album

stringThe album id.

$source

stringPath to photo.

$message

stringPhoto description.

Response

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

deleteComment

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

deleteComment(string $comment) : boolean
since

3.2.0

Arguments

$comment

stringThe comment's id.

Response

booleanReturns true if successful, and false otherwise.

deleteConnection

Method to delete a connection.

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

3.2.0

Arguments

$object

stringThe object id.

$connection

stringThe object's connection name.

$extra_fields

stringURL fields.

Response

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

deleteLike

Method to unlike an album. Requires authentication and publish_stream permission.

deleteLike(string $album) : boolean
since

3.2.0

Arguments

$album

stringThe album 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, integer $until = null, integer $since = null) : string
inherited
since

3.2.0

Arguments

$path

stringURL to inflect.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

integerA unix timestamp or any date accepted by strtotime.

$since

integerA unix timestamp or any date accepted by strtotime.

Response

stringThe request URL.

get

Method to get an object.

get(string $object) : mixed
inherited
since

3.2.0

Arguments

$object

stringThe object id.

Response

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

getAlbum

Method to get an album. Requires authentication and user_photos or friends_photos permission for private photos.

getAlbum(string $album) : mixed
since

3.2.0

Arguments

$album

stringThe album id.

Response

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

getComments

Method to get an album's comments. Requires authentication and user_photos or friends_photos permission for private photos.

getComments(string $album, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

3.2.0

Arguments

$album

stringThe album 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.

getConnection

Method to get object's connection.

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

3.2.0

Arguments

$object

stringThe object id.

$connection

stringThe object's connection name.

$extra_fields

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.

getLikes

Method to get album's likes. Requires authentication and user_photos or friends_photos permission for private photos.

getLikes(string $album, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

3.2.0

Arguments

$album

stringThe album 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.

getOAuth

Method used to get the OAuth client.

getOAuth() : \JFacebookOAuth
inherited
since

3.2.0

Response

\JFacebookOAuthThe OAuth client

getPhotos

Method to get the photos contained in this album. Requires authentication and user_photos or friends_photos permission for private photos.

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

3.2.0

Arguments

$album

stringThe album 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 album's cover photo, the first picture uploaded to an album becomes the cover photo for the album.

getPicture(string $album, boolean $redirect = true) : string

Requires authentication and user_photos or friends_photos permission for private photos.

since

3.2.0

Arguments

$album

stringThe album id.

$redirect

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

Response

stringURL of the picture.

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
inherited
since

3.2.0

throws

\DomainException

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(\JFacebookOAuth $oauth) : \JFacebookObject
inherited
since

3.2.0

Arguments

$oauth

\JFacebookOAuthThe OAuth client object.

Response

\JFacebookObjectThis object for method chaining.

Properties

options

Options for the Facebook object.

inherited
since

3.2.0

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

3.2.0

Type(s)

\JHttp

oauth

The OAuth client.

inherited
since

3.2.0

Type(s)

\JFacebookOAuth