function getTimeline($flink, $timelineUri = 'home_timeline')
 {
     if (empty($flink)) {
         common_log(LOG_ERR, $this->name() . " - Can't retrieve Foreign_link for foreign ID {$fid}");
         return;
     }
     common_log(LOG_DEBUG, $this->name() . ' - Trying to get ' . $timelineUri . ' timeline for Twitter user ' . $flink->foreign_id);
     $client = null;
     if (TwitterOAuthClient::isPackedToken($flink->credentials)) {
         $token = TwitterOAuthClient::unpackToken($flink->credentials);
         $client = new TwitterOAuthClient($token->key, $token->secret);
         common_log(LOG_DEBUG, $this->name() . ' - Grabbing ' . $timelineUri . ' timeline with OAuth.');
     } else {
         common_log(LOG_ERR, "Skipping " . $timelineUri . " timeline for " . $flink->foreign_id . " since not OAuth.");
     }
     $timeline = null;
     $lastId = Twitter_synch_status::getLastId($flink->foreign_id, $timelineUri);
     common_log(LOG_DEBUG, "Got lastId value '" . $lastId . "' for foreign id '" . $flink->foreign_id . "' and timeline '" . $timelineUri . "'");
     try {
         $timeline = $client->statusesTimeline($lastId, $timelineUri);
     } catch (Exception $e) {
         common_log(LOG_ERR, $this->name() . ' - Unable to get ' . $timelineUri . ' timeline for user ' . $flink->user_id . ' - code: ' . $e->getCode() . 'msg: ' . $e->getMessage());
     }
     if (empty($timeline)) {
         common_log(LOG_DEBUG, $this->name() . " - Empty '" . $timelineUri . "' timeline.");
         return;
     }
     common_log(LOG_INFO, $this->name() . ' - Retrieved ' . sizeof($timeline) . ' statuses from ' . $timelineUri . ' timeline' . ' - for user ' . $flink->user_id);
     if (!empty($timeline)) {
         $qm = QueueManager::get();
         // Reverse to preserve order
         foreach (array_reverse($timeline) as $status) {
             $data = array('status' => $status, 'for_user' => $flink->foreign_id);
             $qm->enqueue($data, 'tweetin');
         }
         $lastId = twitter_id($timeline[0]);
         Twitter_synch_status::setLastId($flink->foreign_id, $timelineUri, $lastId);
         common_debug("Set lastId value '{$lastId}' for foreign id '{$flink->foreign_id}' and timeline '" . $timelineUri . "'");
     }
     // Okay, record the time we synced with Twitter for posterity
     $flink->last_noticesync = common_sql_now();
     $flink->update();
 }