From: Zach Copley Date: Thu, 11 Dec 2008 10:01:06 +0000 (-0500) Subject: Twitter bridge: update to handle Twitter API changes to verify_credentials method X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a5d0b0ff813ff15ce15e6110f1f3c638b60b46d5;p=quix0rs-gnu-social.git Twitter bridge: update to handle Twitter API changes to verify_credentials method darcs-hash:20081211100106-7b5ce-c8dfd1f3ded2b9f1258d11457a1c2669a4858185.gz --- diff --git a/actions/twittersettings.php b/actions/twittersettings.php index 5237423616..ae3aff8778 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;