From a5d0b0ff813ff15ce15e6110f1f3c638b60b46d5 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 11 Dec 2008 05:01:06 -0500 Subject: Twitter bridge: update to handle Twitter API changes to verify_credentials method darcs-hash:20081211100106-7b5ce-c8dfd1f3ded2b9f1258d11457a1c2669a4858185.gz --- actions/twittersettings.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/actions/twittersettings.php b/actions/twittersettings.php index 523742361..ae3aff877 100644 --- a/actions/twittersettings.php +++ b/actions/twittersettings.php @@ -338,14 +338,16 @@ class TwittersettingsAction extends SettingsAction { return false; } - $creds = json_decode($data); + $user = json_decode($data); - if (!$creds) { + if (!$user) { return false; } - if ($creds->authorized == 1) { - return true; + $twitter_id = $user->status->id; + + if ($twitter_id) { + return $twitter_id; } return false; -- cgit v1.2.3-54-g00ecf