From 54d04a0c911269036a1fc3708fec6d70c33d5032 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 27 Jan 2010 09:59:40 +0000 Subject: [PATCH] Test script to update your status via OAuth --- tests/oauth/statusupdate.php | 115 +++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 tests/oauth/statusupdate.php diff --git a/tests/oauth/statusupdate.php b/tests/oauth/statusupdate.php new file mode 100644 index 0000000000..4aa230e280 --- /dev/null +++ b/tests/oauth/statusupdate.php @@ -0,0 +1,115 @@ +#!/usr/bin/env php +. + **/ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..')); + +require_once INSTALLDIR . '/extlib/OAuth.php'; + +$shortoptions = 'o:s:u:'; +$longoptions = array('oauth_token=', 'token_secret=', 'update='); + +$helptext = <<sign_request($hmac_method, $test_consumer, $at); + +$r = httpRequest($req_req->to_url()); + +$body = $r->getBody(); + +print "$body\n"; + +//print $req_req->to_url() . "\n\n"; + +function httpRequest($url) +{ + $request = HTTPClient::start(); + + $request->setConfig(array( + 'follow_redirects' => true, + 'connect_timeout' => 120, + 'timeout' => 120, + 'ssl_verify_peer' => false, + 'ssl_verify_host' => false + )); + + return $request->post($url); +} + -- 2.39.5