diff options
author | zach <zach@copley.name> | 2008-07-18 00:03:32 -0400 |
---|---|---|
committer | zach <zach@copley.name> | 2008-07-18 00:03:32 -0400 |
commit | 42bbd38417ffbfe5bfee669e0c52b50187a3032a (patch) | |
tree | 2ce3b7226004a667743cc9805965214f3d87582e /actions/twitapiaccount.php | |
parent | 6a47e89c945f9e6e08fdbfb81aa2a13eae0d9944 (diff) |
Twitter-API: /account/verify_credentials.format now works
darcs-hash:20080718040332-ca946-0c8da4f5e98355ccbb1ee929693fa74bff3c2481.gz
Diffstat (limited to 'actions/twitapiaccount.php')
-rw-r--r-- | actions/twitapiaccount.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/actions/twitapiaccount.php b/actions/twitapiaccount.php index 93e0844c1..0198671e7 100644 --- a/actions/twitapiaccount.php +++ b/actions/twitapiaccount.php @@ -24,8 +24,17 @@ require_once(INSTALLDIR.'/lib/twitterapi.php'); class TwitapiaccountAction extends TwitterapiAction { function verify_credentials($args, $apidata) { - parent::handle($args); - common_server_error("API method under construction.", $code=501); + + if ($apidata['content-type'] == 'xml') { + header('Content-Type: application/xml; charset=utf-8'); + print '<authorized>true</authorized>'; + } elseif ($apidata['content-type'] == 'json') { + header('Content-Type: application/json; charset=utf-8'); + print '{"authorized":true}'; + } else { + common_user_error("API method not found!", $code=404); + } + exit(); } |