]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/TwitterBridge/daemons/synctwitterfriends.php
remove basic auth code for Twitter since it's no longer supported
[quix0rs-gnu-social.git] / plugins / TwitterBridge / daemons / synctwitterfriends.php
index c89c02eedb1e5dfdba1b414271f8b8ee582d8335..5641142d35bc882c4395851053fcead8643e4665 100755 (executable)
@@ -115,7 +115,7 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
         // Each child ps needs its own DB connection
 
         // Note: DataObject::getDatabaseConnection() creates
-        // a new connection if there is not one already
+        // a new connection if there isn't one already
 
         $conn = &$flink->getDatabaseConnection();
 
@@ -144,8 +144,8 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
             $client = new TwitterOAuthClient($token->key, $token->secret);
             common_debug($this->name() . '- Grabbing friends IDs with OAuth.');
         } else {
-            $client = new TwitterBasicAuthClient($flink);
-            common_debug($this->name() . '- Grabbing friends IDs with basic auth.');
+            common_debug("Skipping Twitter friends for {$flink->user_id} since not OAuth.");
+            return $friends;
         }
 
         try {
@@ -221,7 +221,7 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
             // Twitter friend
 
             if (!save_twitter_user($friend_id, $friend_name)) {
-                common_log(LOG_WARNING, $this-name() .
+                common_log(LOG_WARNING, $this->name() .
                            " - Couldn't save $screen_name's friend, $friend_name.");
                 continue;
             }