Methods summary
public
boolean
&
|
#
addTag( integer $pid, integer $tag_uid, string $tag_text, float $x, float $y, array $tags, integer $uid = 0 )
Adds a tag with the given information to a photo. See the wiki for details:
Adds a tag with the given information to a photo. See the wiki for details:
http://wiki.developers.facebook.com/index.php/Photos.addTag
Parameters
- $pid
- The ID of the photo to be tagged
- $tag_uid
- <p>The ID of the user being tagged. You must specify
either the $tag_uid or the $tag_text parameter
(unless $tags is specified).</p>
- $tag_text
- <p>Some text identifying the person being tagged.
You must specify either the $tag_uid or $tag_text
parameter (unless $tags is specified).</p>
- $x
- <p>The horizontal position of the tag, as a
percentage from 0 to 100, from the left of the
photo.</p>
- $y
- <p>The vertical position of the tag, as a percentage
from 0 to 100, from the top of the photo.</p>
- $tags
- <p>(Optional) An array of maps, where each map
can contain the tag_uid, tag_text, x, and y
parameters defined above. If specified, the
individual arguments are ignored.</p>
- $uid
- <p>$owner_uid (Optional) The user ID of the user whose photo
you are tagging. If this parameter is not
specified, then it defaults to the session user.</p>
Returns
boolean
|
public
array
&
|
#
createAlbum( string $name, string $description = '', string $location = '', string $visible = '', integer $uid = 0 )
Creates and returns a new album owned by the specified user or the current
session user.
Creates and returns a new album owned by the specified user or the current
session user.
Parameters
- $name
- The name of the album.
- $description
- (Optional) A description of the album.
- $location
- (Optional) A description of the location.
- $visible
- <p>(Optional) A privacy setting for the album.
One of 'friends', 'friends-of-friends',
'networks', or 'everyone'. Default 'everyone'.</p>
- $uid
- <p>(Optional) User id for creating the album; if
not specified, the session user is used.</p>
Returns
array An album object
|
public
array
&
|
#
get( integer $subj_id = null, integer $aid = null, string $pids = null )
Returns photos according to the filters specified.
Returns photos according to the filters specified.
Note that at least one of these parameters needs to be specified, or an
error is returned.
Parameters
- $subj_id
- (Optional) Filter by uid of user tagged in the photos.
- $aid
- <p>(Optional) Filter by an album, as returned by
photos_getAlbums.</p>
- $pids
- (Optional) Restrict to a comma-separated list of pids
Returns
array An array of photo objects.
|
public
array
&
|
#
getAlbums( integer $uid = null, string $aids = null )
Returns the albums created by the given user.
Returns the albums created by the given user.
Note that at least one of the (uid, aids) parameters must be specified.
Parameters
- $uid
- <p>(Optional) The uid of the user whose albums you want.
A null will return the albums of the session user.</p>
- $aids
- <p>(Optional) A comma-separated list of aids to restricti
the query.</p>
Returns
array of album objects.
|
public
array
&
|
#
getTags( string $pids )
Returns the tags on all photos specified.
Returns the tags on all photos specified.
Parameters
- $pids
- A list of pids to query
Returns
array An array of photo tag objects, which include pid,
subject uid, and two floating-point numbers (xcoord, ycoord)
for tag pixel location.
|
public
array
|
#
upload( string $file, integer $aid = null, string $caption = null, integer $uid = null )
Uploads a photo.
Parameters
- $file
- The location of the photo on the local filesystem.
- $aid
- <p>(Optional) The album into which to upload the
photo.</p>
- $caption
- (Optional) A caption for the photo.
- $uid
- <p>(Optional) The user ID of the user whose photo you
are uploading</p>
Returns
array An array of user objects
|