Any kind of help would be appreciated. I need to know whether I am moving
in the right direction. Is it the way to do it? Or am I doing something
terribly wrong. If my question needs further clarification, then please let
me know. I'll try to phrase my question in a different manner.

Thanks :)

On Tue, Mar 3, 2015 at 12:59 PM, Aryak Sengupta <[email protected]>
wrote:

> Hi everyone,
>
> I am new to Nodejs and Socket.io. I have worked through a tutorial which
> describes how both the technologies work together.
>
> *The link to the tutorial is this :--- >  Build a real-time Twitter stream
> <https://scotch.io/tutorials/build-a-real-time-twitter-stream-with-node-and-react-js>
>  and
> the code **for the tutorial **is posted at github :---> Code of
> react-tweets <https://github.com/scotch-io/react-tweets>. *
>
> Everything works fine in the tutorial and I also have no issues in
> understanding the code since the code is well commented.
>
>
>
> * In the server.js file, the tracking keyword which is "javascript" is
> manually fed into the "twit" object. i.e. here is the code for it. *
> *twit.stream('statuses/filter',{ track: 'javascript'}, function(stream){*
> *  streamHandler(stream,io);*
> *});*
>
>
>
> *But I want to make a minor alteration in the code to make the application
> a bit more versatile. I want to change the tracking keyword dynamically
> using the URL entered by the user.*For example, if the URL entered is 
> *http://localhost/football
> <http://localhost/football>*, then automatically I want the track keyword
> to be changed to "*football*". The code should look like
>
> *twit.stream('statuses/filter',{ track: 'football'}, function(stream){*
> *  streamHandler(stream,io);*
> *});*
>
> Now, I tried to set this object inside the *app.get("/cricket",
> twit.stream.......); *function but I get an error "Expected callback got
> object" .
>
> How do I change the above mentioned code to achieve this?. Please let me
> know.
>
> Thanks a lot.
>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CALTbq1zohfeK3HXxyNcwWt%2BkJKyjASiJ9LcFb46ur6TFAs4bxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to