justin.tv jquery get some data

Posted by Petter Thowsen on Stack Overflow See other posts from Stack Overflow or by Petter Thowsen
Published on 2012-03-30T17:19:09Z Indexed on 2012/03/30 17:30 UTC
Read the original article Hit count: 484

Filed under:
|

I've been reading for hours on this json stuff and the justin.tv API documenation but still unable to get the number of viewers currently viewing my stream.

Here's a json script I tried, nothing happens.

    var url = "http://api.justin.tv/api/stream/list.json";

    $.ajax({
       url: url,
       dataType: 'jsonp',
       data: { channel: "dreamvoid"},
       success: function(data) { $('#result').text(JSON.stringify(data.stream_count)); },
       jsonp: 'jsonp'
    });

© Stack Overflow or respective owner

Related posts about stream

Related posts about justin.tv