Update Twitter Status
if (!isset($_POST['submit'])) {
?>
} else {
// include class
include_once 'Services/Twitter.php';
try {
// read form input
$user = $_POST['user'];
$pass = $_POST['pass'];
$status = $_POST['status'];
// initialize service object
$service = new Services_Twitter($user, $pass);
// update status
$service->statuses->update($status);
// perform logout
$service->account->end_session();
echo 'Status updated!';
} catch (Exception $e) {
die('ERROR: ' . $e->getMessage());
}
}
?>

No comments:
Post a Comment