PHP Класс Horde_Service_Facebook_Photos, horde

Copyright 2009-2016 Horde LLC (http://www.horde.org/)
Автор: Michael J. Rubinsky ([email protected])
Наследование: extends Horde_Service_Facebook_Base
Показать файл Открыть проект

Открытые методы

Метод Описание
addTag ( string $pid, array $options = [] ) : boolean Adds a tag with the given information to a photo. See the wiki for details:
createAlbum ( string $name, string $description = '', string $uid = 'me' ) : array Creates and returns a new album owned by the specified user or the current session user.
get ( array $filter = [], array $options = [] ) : array Returns photos according to the filters specified.
getAlbums ( integer $uid = 'me', string $aids = null ) : array Returns the albums created by the given user.
getTags ( string $pid ) : array Return the tags for a photo.
upload ( array $params = [] ) : array Uploads a photo.

Описание методов

addTag() публичный Метод

http://wiki.developers.facebook.com/index.php/Photos.addTag
public addTag ( string $pid, array $options = [] ) : boolean
$pid string The ID of the photo to be tagged
$options array An options array: - to: (string) A UID of the user being tagged. - text: (string) Text to name the user if UID is not known/available. - x: (float) The horizontal position of the tag as a percentage from the left of the photo. - y: (float) The vertical position of the tag as a percentage from the top of the photo.
Результат boolean

createAlbum() публичный Метод

Creates and returns a new album owned by the specified user or the current session user.
public createAlbum ( string $name, string $description = '', string $uid = 'me' ) : array
$name string The name of the album.
$description string (Optional) A description of the album.
$uid string (Optional) User id for creating the album; if not specified, the session user is used.
Результат array An album object

get() публичный Метод

Returns photos according to the filters specified.
public get ( array $filter = [], array $options = [] ) : array
$filter array An options array containing a maximum of ONE of the following values: - tagged: Filter by photos tagged with this user. - album: Filter by photos in these albums. - photos: Only return indicated photos.
$options array Additional options: - limit: (integer) The maximum number of posts to return. - offset: (integer) The post to start returning from.
Результат array An array of photo objects.

getAlbums() публичный Метод

Note that at least one of the (uid, aids) parameters must be specified.
public getAlbums ( integer $uid = 'me', string $aids = null ) : array
$uid integer (Optional) The uid of the user whose albums you want. A null will return the albums of the session user.
$aids string (Optional) A comma-separated list of aids to restricti the query.
Результат array of album objects.

getTags() публичный Метод

Return the tags for a photo.
public getTags ( string $pid ) : array
$pid string The photo id
Результат array An array of photo tag objects, which include pid, subject uid, and two floating-point numbers (xcoord, ycoord) for tag pixel location.

upload() публичный Метод

Uploads a photo.
public upload ( array $params = [] ) : array
$params array The parameter array. - file: (string) A local path to the file to upload. DEFAULT: None, but either 'file' or 'url' is required. - url: (string) A URL to an image to upload. DEFAULT: None, but either 'file' or 'url' is required. - aid: (string) The album id. DEFAULT: None (Will upload to the application's album). - caption: (string) The photo caption. DEFAULT: None. - place: (string) A Facebook UID of the place the photo was taken near. DEFAULT: None. - uid: (string) The Facebook UID of the user we are uploading on behalf of. DEFAULT: None (Will upload on behalf of the current user).
Результат array An array of user objects