From 0f8b902004dc7245a56307ed69c766d949f06dc3 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 8 Jan 2009 16:15:08 -0500 Subject: Revert "Twitter-compatible API - update verify_credentials to return profile" This reverts commit b801f73b1f4706f15783f91fd07508a03175592d. Twhirl assumes we return the old kind of results, so we have to do that. --- actions/twitapiaccount.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'actions/twitapiaccount.php') diff --git a/actions/twitapiaccount.php b/actions/twitapiaccount.php index f6e955828..c1960561e 100644 --- a/actions/twitapiaccount.php +++ b/actions/twitapiaccount.php @@ -24,14 +24,17 @@ require_once(INSTALLDIR.'/lib/twitterapi.php'); class TwitapiaccountAction extends TwitterapiAction { function verify_credentials($args, $apidata) { - parent::handle($args); - if (!in_array($apidata['content-type'], array('xml', 'json'))) { - common_user_error(_('API method not found!'), $code = 404); - return; + if ($apidata['content-type'] == 'xml') { + header('Content-Type: application/xml; charset=utf-8'); + print 'true'; + } 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); } - $this->show_extended_profile($apidata['user'], $apidata); } function end_session($args, $apidata) { -- cgit v1.2.3-54-g00ecf