I ran into the same problem trying to do this in Ruby last night using this
technique: http://www.robares.com/2009/07/14/streaming-twitter-api.html

I think it's because /statuses/filter.json requires a POST, which isn't
supported by yajl-ruby.  So I'm stuck.  It works fine if you use one of the
other GET methods like /statuses/sample.json.

Jim Gilliam
http://act.ly/
http://twitter.com/jgilliam

On Sat, Sep 19, 2009 at 7:31 AM, Greg <gregory.av...@gmail.com> wrote:

>
> I'm trying to implement Streaming API on my Twitter application to
> enhance the stabilty instead of using the Search API.
>
> Basically - I'm trying to use the track paramter to track a keyword.
> However, when I run this code - it just times out - nothing occurs.
> Perhaps I'm not using the track parameter correctly?
>
> I know I'm just dumping the code right now - but it was merely for
> test.
>
> My ad-hoc code is below:
>
> // twitter_stream.php
> <?
> $fp = fopen("http://username:passw...@stream.twitter.com/1/statuses/
> filter.json?track=ttl,wine<http://username:passw...@stream.twitter.com/1/statuses/%0Afilter.json?track=ttl,wine>",
> "r");
> while($data = fgets($fp))
> {
>    $new_data = json_decode($data);
>
>        foreach($status as $new_data)
>        {
>                var_dump($status);
>                echo "<hr>";
>        }
> }
> ?>
>
> Thanks for the help!
>
> Greg
>

Reply via email to