Twitter bridge: update to handle Twitter API changes to verify_credentials method

darcs-hash:20081211100106-7b5ce-c8dfd1f3ded2b9f1258d11457a1c2669a4858185.gz
This commit is contained in:
Zach Copley 2008-12-11 05:01:06 -05:00
parent 6d464ec91b
commit a5d0b0ff81

View File

@ -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;