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

Class: Services_Facebook_Photos

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

Class Overview

Services_Facebook_Common
   |
   --Services_Facebook_Photos

Facebook Notifications Interface


Author(s):

Version:

  • Release: 0.1.2

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 33]
Facebook Notifications Interface


[ Top ]


Class Variables

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

[line 44]

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 65]

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 92]

boolean addTags( int $pid, array $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 112]

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 190]

object Instance getAlbumsByPhotos( array $pids)

Get albums from photo ids

Parameters:

array   $pids   —  Array of Facebook pids

[ Top ]

getAlbumsByUser   [line 206]

object Instance getAlbumsByUser( int $uid)

Get uid's photo albums

Parameters:

int   $uid   —  Facebok uid to fetch albums

[ Top ]

getPhotos   [line 138]

object Instance getPhotos( mixed $pids)

Get photos

Parameters:

mixed   $pids   —  A single pid or an array of pids

[ Top ]

getPhotosByAlbum   [line 158]

object Instance getPhotosByAlbum( integer $aid)

Get photos from a given album

Parameters:

integer   $aid   —  Album ID to fetch photos from

[ Top ]

getPhotosByUser   [line 174]

object Instance getPhotosByUser( integer $uid)

Get photos tagged with a specific user

Parameters:

integer   $uid   —  User ID to fetch photos for

[ Top ]

getTags   [line 222]

object Instance getTags( array $pids)

Get tags for given pids

Parameters:

array   $pids   —  Facebook pids to fetch tags for

[ Top ]

upload   [line 241]

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 Mon, 11 Mar 2019 15:24:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.