JFacebookPhoto
Extends \JFacebookObjectFacebook API Photo 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.
createComment
Method to comment on a photo. Requires authentication and publish_stream permission, user_photos or friends_photos permission for private photos.
createComment(string $photo, string $message) : mixed
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo id.- $message
string
The comment's text.
Response
mixed
The 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
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.
createLike
Method to like a photo. Requires authentication and publish_stream permission, user_photos or friends_photos permission for private photos.
createLike(string $photo) : boolean
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo id.
Response
boolean
Returns true if successful, and false otherwise.
createTag
Method to tag one or more Users in a photo. $to or $tagText required.
createTag(string $photo, mixed $to = null, string $tagText = null, integer $x = null, integer $y = null) : boolean
Requires authentication and publish_stream permission, user_photos permission for private photos.
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo id.- $to
mixed
ID of the User or an array of Users to tag in the photo: [{"id":"1234"}, {"id":"12345"}].- $tagText
string
A text string to tag.- $x
integer
x coordinate of tag, as a percentage offset from the left edge of the picture.- $y
integer
y coordinate of tag, as a percentage offset from the top edge of the picture.
Response
boolean
Returns true if successful, and false otherwise.
deleteComment
Method to delete a comment. Requires authentication and publish_stream permission, user_photos or friends_photos permission for private photos.
deleteComment(string $comment) : boolean
since |
3.2.0 |
---|
Arguments
- $comment
string
The comment's id.
Response
boolean
Returns true if successful, and false otherwise.
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.
deleteLike
Method to unlike a photo. Requires authentication and publish_stream permission, user_photos or friends_photos permission for private photos.
deleteLike(string $photo) : boolean
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo 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.
getComments
Method to get a photo's comments. Requires authentication and user_photos or friends_photos permission for private photos.
getComments(string $photo, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo 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.
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.
getLikes
Method to get photo's likes. Requires authentication and user_photos or friends_photos permission for private photos.
getLikes(string $photo, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo 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.
getOAuth
Method used to get the OAuth client.
getOAuth() : \JFacebookOAuth
getPhoto
Method to get a photo. Requires authentication and user_photos or friends_photos permission for private photos.
getPhoto(string $photo) : mixed
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo id.
Response
mixed
The decoded JSON response or false if the client is not authenticated.
getPicture
Method to get the album-sized view of the photo. Requires authentication and user_photos or friends_photos permission for private photos.
getPicture(string $photo, boolean $redirect = true) : string
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo id.- $redirect
boolean
If false this will return the URL of the picture without a 302 redirect.
Response
string
URL of the picture.
getTags
Method to get the Users tagged in the photo. Requires authentication and user_photos or friends_photos permission for private photos.
getTags(string $photo, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo 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.
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.
updateTag
Method to update the position of the tag for a particular Users in a photo.
updateTag(string $photo, string $to, integer $x = null, integer $y = null) : boolean
Requires authentication and publish_stream permission, user_photos permission for private photos.
since |
3.2.0 |
---|
Arguments
- $photo
string
The photo id.- $to
string
ID of the User to update tag in the photo.- $x
integer
x coordinate of tag, as a percentage offset from the left edge of the picture.- $y
integer
y coordinate of tag, as a percentage offset from the top edge of the picture.
Response
boolean
Returns true if successful, and false otherwise.
Properties
client
The HTTP client object to use in sending HTTP requests.
since |
3.2.0 |
---|
Type(s)
\JHttp