title: Display twit stream on client side Meteor js
body: <h1>Hi everyone</h1>
  
  <p>I'm working on an app wich will display twwets from a certain hashtag in the browser using Meteor.js and Twit.
  I actually need to display a Twit stream from the server to the client side. I've actually put the stream's launch and stop in meteor methods, to activate them only when I'm in the good client view, but the console.log() only run on the server side.</p>
  
  <h2>Here is my code :</h2>
  
  <h3>Server Side</h3>
  
  <pre><code>    var Twit = Meteor.require('twit');
      var T = new Twit({
          consumer_key:         '...',
          consumer_secret:      '...',
          access_token:         '...',
          access_token_secret:  '...'
      });
  
      var stream;
  
      Meteor.methods({
          stream: function(hashtag) {
              //Initialisation
              stream = T.stream('statuses/filter', { track: hashtag });
  
              // stream launch
              stream.on('tweet', function (tweet) {
  
                  //Console log for testing
                  console.log(tweet.user.name+" a tweeté ceci: "+tweet.text+" le "+tweet.created_at);
                  console.log("=========================================");
  
              });
          }, 
          streamStop: function() {
              stream.stop();
          }
      });
  </code></pre>
  
  <h3>Client side</h3>
  
  <pre><code>    Template.hashtagPage.rendered = function() {
          var hashtag = document.getElementById('hashtag').innerHTML;
          // Récupère les ID pour le stream
          Meteor.call('stream', hashtag);
      };
  
      // Stop le stream quand on quitte la page
      Template.hashtagPage.destroyed = function(){
          Meteor.call('streamStop');
      };
  </code></pre>
  
  <p>You can find <strong>Twit</strong> here: <a href="https://github.com/ttezel/twit" rel="nofollow">https://github.com/ttezel/twit</a></p>
  
  <p>My <strong>git repo</strong> if you want: <a href="https://github.com/ABattut/croisillon/commits?author=ABattut" rel="nofollow">https://github.com/ABattut/croisillon/commits?author=ABattut</a></p>
  
  <p>I've tried some solutions, like make a function who will return the T object to the client side, in vain. Return the tweet to the client and display it. I tried to use Fiber too (like seen in some questions in Google).</p>
  
  <p>I don't know how to do it. I'm looking for a solution to console.log() the Twit stream on the client side, or a way to display them in the HTML directly (that would be top).</p>
  
  <p>Thanks for reading and answering.</p>