]> 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 76410c7cbf48bd86cc2fdac52f5c773b0e4273c4..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();
 
@@ -126,7 +126,7 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
 
         $conn->disconnect();
 
-        // XXX: Could not find a less brutal way to blow
+        // XXX: Couldn't find a less brutal way to blow
         // away a cached connection
 
         global $_DB_DATAOBJECT;
@@ -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 {
@@ -188,7 +188,7 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
 
             if (empty($more_friends)) {
                 common_log(LOG_WARNING, $this->name() .
-                           " - Could not retrieve page $i " .
+                           " - Couldn't retrieve page $i " .
                            "of Twitter user $flink->foreign_id friends.");
                 continue;
             } else {
@@ -221,12 +221,12 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
             // Twitter friend
 
             if (!save_twitter_user($friend_id, $friend_name)) {
-                common_log(LOG_WARNING, $this-name() .
-                           " - Could not save $screen_name's friend, $friend_name.");
+                common_log(LOG_WARNING, $this->name() .
+                           " - Couldn't save $screen_name's friend, $friend_name.");
                 continue;
             }
 
-            // Check to see if there is a related local user
+            // Check to see if there's a related local user
 
             $friend_flink = Foreign_link::getByForeignID($friend_id,
                                                          TWITTER_SERVICE);