]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/TwitterBridge/daemons/synctwitterfriends.php
correctly mark repeats from Twitter as non-local
[quix0rs-gnu-social.git] / plugins / TwitterBridge / daemons / synctwitterfriends.php
index 671e3c7afa35cb721a8195aadcc2953fd414dbca..02546a02cad93538d11ecb3d4ffb5d14c3952aa9 100755 (executable)
@@ -33,7 +33,6 @@ END_OF_TRIM_HELP;
 require_once INSTALLDIR . '/scripts/commandline.inc';
 require_once INSTALLDIR . '/lib/parallelizingdaemon.php';
 require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
-require_once INSTALLDIR . '/plugins/TwitterBridge/twitterbasicauthclient.php';
 require_once INSTALLDIR . '/plugins/TwitterBridge/twitteroauthclient.php';
 
 /**
@@ -144,8 +143,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 +220,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;
             }