My favorites | Sign in
Project Logo
                
Code license: New BSD License
Labels: php, pear, twitpic, twitter
Links:
Feeds:
People details
Project owners:
  bshupp

Services_TwitPic

PHP PEAR Package for accessing TwitPic's API.

Installation

Example

<?php

require_once 'Services/TwitPic.php';

$user     = 'username';
$pass     = 'password';
$filename = '/Users/bill/Desktop/images.jpg';

$twit = new Services_TwitPic($user, $pass);
try {
    $twit->setOptions(array('timeout' => 10));
    $result = $twit->uploadAndPost($filename, 'testing image upload');
    print_r($result);
} catch (Services_TwitPic_Exception $e) {
    print_r($e->getMessage());
    print_r($e->getCode());
}

?>

Running Tests

cd <pear directory>tests/Services_TwitPic
phpunit Services_TwitPicTest tests/TwitPicTest.php








Hosted by Google Code