title: Stream multiple Twitter timelines including protected
body: <p>I'm creating a simple Twitter app where I want to stream the timeline of the logged in user, but I can't figure out the right way. </p>
  
  <p>With hard coded parameters it works fine, but I don't know how should I pass the logged in user's (token, who they are following) to the stream processor (which is running separately, in terminal), which checks the right timeline and returns it. </p>
  
  <p>I also would like to get the tweets of the protected people followed by the user, but Stream API doesn't support that.</p>
  
  <p>I'm using the <a href="https://www.google.hu/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0CCAQFjAAahUKEwii1ueI_KHHAhVEWhQKHfzJDh8&amp;url=https%3A%2F%2Fpackagist.org%2Fpackages%2Fimpensavel%2Ffloodgate&amp;ei=gGjKVaKWO8S0UfyTu_gB&amp;usg=AFQjCNER7l48ySFnNUt3M-IqCLdUBwJNNA&amp;sig2=Ks8AZI77VCdkipiiuScNcw&amp;bvm=bv.99804247,d.d24" rel="nofollow">Impensavel\Floodgate</a> library, and, and my simple hard coded classes looks like this:</p>
  
  <pre><code>class Streaming extends Floodgate
  {
      /**
       * {@inheritDoc}
       */
      public function getParameters()
      {
          return [
              'follow' =&gt; 83408038
          ];
      }
  }
  </code></pre>
  
  <p>This starts the actual requests, I just made a Symfony command out of it:</p>
  
  <pre><code>class StreamCommand extends ContainerAwareCommand
  {
  
   protected function configure()
      {
          $this-&gt;setName('stream:start');
      }
   protected function execute(InputInterface $input, OutputInterface    $output)
    {
      $config = [
          'consumer_key' =&gt; '**',
          'consumer_secret' =&gt; '**',
          'token' =&gt; '**',
          'token_secret' =&gt; '**',
      ];
  
      $stream = Streaming::create($config);
  
      $stream-&gt;filter(function ($data) {
          if(isset($data-&gt;text)){
              echo $data-&gt;text . PHP_EOL;
          }
      });
    }
  }
  </code></pre>
  
  <p>With what kind of logic could I achieve the streaming of each user's own timeline, including protected users?</p>