]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Twitter bridge: update to handle Twitter API changes to verify_credentials method
authorZach Copley <zach@controlyourself.ca>
Thu, 11 Dec 2008 10:01:06 +0000 (05:01 -0500)
committerZach Copley <zach@controlyourself.ca>
Thu, 11 Dec 2008 10:01:06 +0000 (05:01 -0500)
darcs-hash:20081211100106-7b5ce-c8dfd1f3ded2b9f1258d11457a1c2669a4858185.gz

actions/twittersettings.php

index 5237423616b6aa44fe32067c492b6d3a98e9c93a..ae3aff877837c80809d5bcf51ff2b18d21cfa965 100644 (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;