Services_Facebook
[ class tree: Services_Facebook ] [ index: Services_Facebook ] [ all elements ]

Class: Services_Facebook_Photos

Source Location: /Services_Facebook-0.2.8/Services/Facebook/Photos.php

Class Overview

Services_Facebook_Common
   |
   --Services_Facebook_Photos

Facebook Notifications Interface


Author(s):

Version:

  • Release: 0.2.8

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
Facebook Notifications Interface


[ Top ]


Class Variables

$imageTypes = array(
        IMAGETYPE_GIF => 'image/gif',
        IMAGETYPE_JPEG => 'image/jpeg',
        IMAGETYPE_PNG => 'image/png'
    )

[line 46]

Image types allowed for upload

Facebook doesn't specify which types of images you can upload so we restrict file uploads to the "Big Three".


Type:   array


[ Top ]



Method Detail

addTag   [line 67]

boolean addTag( int $pid, float $x, float $y, mixed $tag)

Add a tag to a photo

Adds a tag to a photo. The x/y coordinates are a float based percentage from the left/top of the photo. The tag parameter is either a valid Facebook uid or a simple text string for a tag.


Parameters:

int   $pid     Picture ID to add tag to
float   $x     Horizontal postion as percentage
float   $y     Vertical position as percentage
mixed   $tag     Integer = uid, String = textual tag

[ Top ]

addTags   [line 94]

boolean addTags( int $pid, $tags)

Add a series of tags to a photo
  • Return: True if success, false on failure
  • Access: public

Parameters:

int   $pid     Photo ID to attach tags to
array   $tags     Array of tags to add to phot

[ Top ]

createAlbum   [line 114]

object An createAlbum( string $name, [string $location = ''], [string $description = ''])

Create a photo album

Parameters:

string   $name     Name of photo album
string   $location     Location of album
string   $description     A short description of album

[ Top ]

getAlbumsByPhotos   [line 192]

object Instance getAlbumsByPhotos( $pids)

Get albums from photo ids

Parameters:

array   $pids     Array of Facebook pids

[ Top ]

getAlbumsByUser   [line 208]

object Instance getAlbumsByUser( int $uid)

Get uid's photo albums

Parameters:

int   $uid     Facebok uid to fetch albums

[ Top ]

getPhotos   [line 140]

object Instance getPhotos( mixed $pids)

Get photos

Parameters:

mixed   $pids     A single pid or an array of pids

[ Top ]

getPhotosByAlbum   [line 160]

object Instance getPhotosByAlbum( integer $aid)

Get photos from a given album

Parameters:

integer   $aid     Album ID to fetch photos from

[ Top ]

getPhotosByUser   [line 176]

object Instance getPhotosByUser( integer $uid)

Get photos tagged with a specific user

Parameters:

integer   $uid     User ID to fetch photos for

[ Top ]

getTags   [line 224]

object Instance getTags( $pids)

Get tags for given pids

Parameters:

array   $pids     Facebook pids to fetch tags for

[ Top ]

upload   [line 243]

object Instance upload( string $file, [integer $aid = 0], [string $caption = ''])

Upload a photo

Parameters:

string   $file     Path to file you want to upload
integer   $aid     Album to upload photo into
string   $caption     A short caption

[ Top ]


Documentation generated on Fri, 05 Jun 2009 19:00:05 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.