메소드 | 설명 | |
---|---|---|
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. |
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 |
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 |
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. |
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 |