/**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     if (isFacebookLinked()) {
         $this->stats->updateFbStats();
     }
     if (isTwitterLinked()) {
         $this->stats->updateTwitterStats();
     }
     $this->log->updateLog('stats');
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     if (isFacebookLinked()) {
         $this->update->collectPrivateConversations();
         $this->update->collectPosts();
     }
     if (isTwitterLinked()) {
         $this->update->collectMentions();
         $this->update->collectDirectMessages();
     }
     $this->log->updateLog('fetching');
 }
 /**
  * Get most recent id's for Twitter & Facebook
  *
  * @return void
  */
 private function initIds()
 {
     $message = new Message();
     if (isTwitterLinked()) {
         $mentionId = $this->twitterContent->newestMentionId();
         $directId = $this->twitterContent->newestDirectId();
         if ($mentionId) {
             $message->tweet_id = $mentionId;
         }
         if ($directId) {
             $message->direct_id = $directId;
         }
     }
     if (isFacebookLinked()) {
         $postId = $this->facebookContent->newestPostId();
         $conversationId = $this->facebookContent->newestConversationId();
         if ($postId) {
             $message->fb_post_id = $postId;
         }
         if ($conversationId) {
             $message->fb_private_id = $conversationId;
         }
     }
     $message->post_date = Carbon::now();
     $message->save();
     $this->log->updateLog('fetching');
 }