Hej guys,
I am actually using Rhodes to get a Public Timeline from Twitter.
Here is a simplified code sample :
res = Rho::AsyncHttp.get( :url => '
http://search.twitter.com/
search.json?q=<qword here>' )
puts res['body']
parsed = Rho::JSON.parse(res['body'])
And here is my output :
APP| {"results"=>[{"profile_image_url"=>"
http://a0.twimg.com/
profile_images/832826388/me_before_normal.JPG", "created_at"=>"Mon, 18
Oct 2010 16:36:09 +0000", "from_user"=>"kiddouk",
"metadata"=>{"result_type"=>"recent"}, "to_user_id"=>nil, "text"=>"no,
you really haven't seen it. #nmd2010", "id"=>27750683143,
"from_user_id"=>17556, "geo"=>nil, "iso_language_code"=>"en",
"source"=>"<a href="
http://www.tweetdeck.com"
rel="nofollow">TweetDeck</a>"}],
"max_id"=>27886331883, "since_id"=>0, "refresh_url"=>"?
since_id=27886331883&q=nmd2010", "results_per_page"=>15, "page"=>1,
"completed_in"=>0.01512, "query"=>"nmd2010"}
RJSON| rjson_tokener_parse_ex: error unexpected character at offset 0;
String:
RJSON| Incorrect json body.Error:JSON error code: 4; Offset: 0
Any idea on why I get such an error ?
regards,